Created
June 27, 2014 16:37
-
-
Save quanon/97d665ea58fd8ba5ecd0 to your computer and use it in GitHub Desktop.
zsh での function の書き方
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# コマンドのまとまりを記述、hogeがコマンド名になる | |
function hoge () { | |
echo command | |
} | |
# ラインエディタを有効にする。自分が新しいコマンドを作る場合に必要 | |
zle -N hoge | |
# キーバインドを設定 | |
bindkey '^a' hoge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment