今日zshをちょっと触ってみたので、自分用の備忘録。
履歴のインクリメンタルサーチ
^R
^S
コマンドラインスタック
・Esc-h
コマンド入力中にmanを参照できる
・Esc-q
入力中のコマンドをスタックに退避し、コマンドラインを空にする。
何かコマンドを実行orEnterキー入力でスタックから取り出される。
ファイルグロブ
・**/
ディレクトリ以下を再帰的に参照
・()
ファイル属性等による絞り込み
→tabでリストが表示されるので詳細は省略
基本的な事しか書いてないけど、.zshrcの内容も残しておきます。
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=100000
SAVEHIST=100000
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/eagle/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
PS1='%F{yellow}%h%)%f%F{green}%U?%?:J%j %#%u%f'
RPS1='[%~'
# cd
setopt autopushd
setopt pushdignoredups
setopt pushdsilent
# history
setopt histignorealldups
setopt histignorespace
setopt sharehistory
unsetopt flowcontrol
# alias
alias vi='vim'
alias ls='ls --color=auto'
alias ll='ls -l'
alias la='ls -a'
alias lla='ls -al'
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
alias so='source'
alias d='dirs -v'
alias j='jobs -ld'
# screen (UTF-8 mode)
alias screen='screen -U'
# use setenv as export
setenv () {export $1="$*[2,-1]"}
unsetenv () {unset $1}
履歴のインクリメンタルサーチ
^R
^S
コマンドラインスタック
・Esc-h
コマンド入力中にmanを参照できる
・Esc-q
入力中のコマンドをスタックに退避し、コマンドラインを空にする。
何かコマンドを実行orEnterキー入力でスタックから取り出される。
ファイルグロブ
・**/
ディレクトリ以下を再帰的に参照
・()
ファイル属性等による絞り込み
→tabでリストが表示されるので詳細は省略
基本的な事しか書いてないけど、.zshrcの内容も残しておきます。
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=100000
SAVEHIST=100000
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/eagle/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
PS1='%F{yellow}%h%)%f%F{green}%U?%?:J%j %#%u%f'
RPS1='[%~'
# cd
setopt autopushd
setopt pushdignoredups
setopt pushdsilent
# history
setopt histignorealldups
setopt histignorespace
setopt sharehistory
unsetopt flowcontrol
# alias
alias vi='vim'
alias ls='ls --color=auto'
alias ll='ls -l'
alias la='ls -a'
alias lla='ls -al'
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
alias so='source'
alias d='dirs -v'
alias j='jobs -ld'
# screen (UTF-8 mode)
alias screen='screen -U'
# use setenv as export
setenv () {export $1="$*[2,-1]"}
unsetenv () {unset $1}