.zshenv - zshの設定
Table of Contents |
.zshenv_s1170232 にあります。
csh 等で煩わしかった組み込み変数の設定 
zsh では、自動的にディレクトリの有無を調べたり重複を削除したりするので、マシンごとに組み込み変数を設定する必要はありません。
(N-/) 
path=($path(N-/) /*/bin(N-/) /*/*/bin(N-/) /usr/sbin(N-/) /usr/ucb(N-/) $HOME/bin(N-/)) というように配列として組み込み変数を作成できます。 この場合では、ホームディレクトリに bin ディレクトリがなければ、自動的に zsh が $HOME/bin を $PATH から削除します
typeset 
-A -- specify that arguments refer to associative arrays -E -- floating point, use engineering notation on output -F -- floating point, use fixed point decimal on output -H -- hide value of parameter in listings -L -- left justify and remove leading blanks from value -R -- right justify and fill with leading blanks -T -- tie scalar to array -U -- keep array values unique and suppress alias expansion for functions -Z -- right justify and fill with leading zeros -a -- specify that arguments refer to arrays -f -- specify that arguments refer to functions -g -- do not restrict parameter to local scope -h -- hide specialness of parameter -i -- represent internally as an integer -k -- mark function for ksh-style autoloading -l -- convert the value to lowercase -m -- treat arguments as patterns -p -- output parameters in form of calls to typeset -r -- mark parameters as readonly -t -- tag parameters and turn on execution tracing for functions -u -- convert the value to uppercase or mark function for autoloading -x -- export parameter -z -- mark function for zsh-style autoloading
配列で作成された組み込み変数から重複を削除するには -U オプションをつけます。
typeset -U path