喜欢的自己抱走...
代码: 全选
export PATH=$HOME/curd:$PATH
function chpwd(){
rm -f "$HOME/curd"
ln -sf "$(pwd -P)" "$HOME/curd"
hash -r
}
代码: 全选
export PATH=$HOME/curd:$PATH
function chpwd(){
rm -f "$HOME/curd"
ln -sf "$(pwd -P)" "$HOME/curd"
hash -r
}
代码: 全选
export PATH=$PATH:
好吧,*BSD 也算。YeLee 写了:仙子开玩笑的吧,有多少台公共电脑是Linux的,而且,就算是Linux,又有几个人是开机就往终端跑的。![]()
![]()
riptide2012 写了:没试出来...aerofox 写了:这样也行:少了后面那个点。代码: 全选
export PATH=$PATH:
那个点可以理解为展开成当前目录,这个什么都不加算什么意思呢?
上面的内容摘自bash的帮助,zsh的帮助太长了,懒得找,不过恰好也是支持这种方式的。PATH
The search path for commands. It is a colon-separated list of directories in which the shell looks for commands (see COMMAND EXECUTION below). A zero-length (null) directory name in the value of PATH indicates the current directory. A null directory name may appear as two adjacent colons, or as an initial or trailing colon. The default path is system-dependent, and is set by the administrator who installs bash. A common value is ``/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin''.
我到干净的bash和zsh试了下,的确都是可以的。看来这笔账要算到oh-my-zsh上面了...aerofox 写了:riptide2012 写了:没试出来...aerofox 写了:这样也行:少了后面那个点。代码: 全选
export PATH=$PATH:
那个点可以理解为展开成当前目录,这个什么都不加算什么意思呢?上面的内容摘自bash的帮助,zsh的帮助太长了,懒得找,不过恰好也是支持这种方式的。PATH
The search path for commands. It is a colon-separated list of directories in which the shell looks for commands (see COMMAND EXECUTION below). A zero-length (null) directory name in the value of PATH indicates the current directory. A null directory name may appear as two adjacent colons, or as an initial or trailing colon. The default path is system-dependent, and is set by the administrator who installs bash. A common value is ``/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin''.
注意。.在PATH的最后。lilydjwg 写了:如果你是一台公共电脑上的 root,那我就去 /tmp 目录放个 ls 好了。
代码: 全选
] ls -ld //
哦,那问题不大= =tusooa 写了:注意。.在PATH的最后。lilydjwg 写了:如果你是一台公共电脑上的 root,那我就去 /tmp 目录放个 ls 好了。