Skip to content

Instantly share code, notes, and snippets.

@quanon
Created June 27, 2014 16:37
Show Gist options
  • Save quanon/97d665ea58fd8ba5ecd0 to your computer and use it in GitHub Desktop.
Save quanon/97d665ea58fd8ba5ecd0 to your computer and use it in GitHub Desktop.
zsh での function の書き方
# コマンドのまとまりを記述、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