Skip to content

Instantly share code, notes, and snippets.

@a-know
Created May 13, 2015 01:44
Show Gist options
  • Save a-know/9ffb711514fb620a5b46 to your computer and use it in GitHub Desktop.
Save a-know/9ffb711514fb620a5b46 to your computer and use it in GitHub Desktop.
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