Skip to content

Instantly share code, notes, and snippets.

@mystelynx
Last active December 15, 2015 22:09
Show Gist options
  • Save mystelynx/5330647 to your computer and use it in GitHub Desktop.
Save mystelynx/5330647 to your computer and use it in GitHub Desktop.
zshで何も入力せずにエンターしたときにlsを実行する。 http://d.hatena.ne.jp/kei_q/20110406/1302091565
accept-line-or-ls() {
zle accept-line
if [[ -z "$BUFFER" ]]; then
echo ''
ls
fi
}
zle -N accept-line-or-ls
@mystelynx
Copy link
Author

キーバインドの設定はどけといた。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment