Skip to content

Instantly share code, notes, and snippets.

@jmatsu
Created August 25, 2015 17:06
Show Gist options
  • Save jmatsu/f0fed6085a8713c5d9eb to your computer and use it in GitHub Desktop.
Save jmatsu/f0fed6085a8713c5d9eb to your computer and use it in GitHub Desktop.
preexec_on_bash() {
[ -z "$COMP_LINE" ] && [ ! "$BASH_COMMAND" = "$PROMPT_COMMAND" ] && {
# $BASH_COMMAND is input commands which are separated by '|', ';' etc..
if [[ $BASH_COMMAND =~ ^\\?git\ ]]; then
:
fi
}
}
trap 'preexec_on_bash' DEBUG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment