Skip to content

Instantly share code, notes, and snippets.

@a-know a-know/press enter
Created May 13, 2015

Embed
What would you like to do?
press enter
# press enter then `ll & git st`
function do_enter() {
if [ -n "$BUFFER" ]; then
zle accept-line
return 0
fi
echo
ll
echo -e "\e[0;33m--- git status ---\e[0m"
git st
# ↓おすすめ
# ls_abbrev
# if [ "$(git rev-parse --is-inside-work-tree 2> /dev/null)" = 'true' ]; then
# echo
# echo -e "\e[0;33m--- git status ---\e[0m"
# git status -sb
# fi
zle reset-prompt
return 0
}
zle -N do_enter
bindkey '^m' do_enter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.