4 ms·
Quite often, I accidentally press the space bar eagerly when typing git commands: $ gi tstatus To fix this, I've added the following to my .bashrc: g
by metrognome 9y ago
Quite often, I accidentally press the space bar eagerly when typing git commands:
$ gi tstatus
To fix this, I've added the following to my .bashrc:
gi() {
args=("$@")
args[0]=${args[0]/t/}
git "${args[@]}"
}
It also works if you drop the "t" altogether.
- QuercusMax 9y agoHa! I have almost the same thing: gi() { ARG=$(echo $1 | sed s/^t//); shift; git "$ARG" "$@"; }