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