Skip to main content



 
#git
#git



 

Bash git fallback


I have a virtual machine with #debian as a #develop machine for some web-related projects (like ~friendica ~friendica).
I use #git a lot, and sometime I forgot to prefix my command with "git".
Based on this, my .bashrc function which allow me to write
$ add filename
and get
git add filename
executed.

command_not_found_handle() {

    export TEXTDOMAIN=command-not-found

    local cmd state rest
    local -i pid ppid pgrp session tty_nr tpgid

    # do not run when inside Midnight Commander or within a Pipe
    if test -n "$MC_SID" -o ! -t 1 ; then
... show more
#debian #develop #git #bash blog