Is there any way to add to or wrap an existing command?
For example, if someone runs git pull it really runs git pull --rebase?
Sure, we've written an alias for it, but the issue is that people aren't using the alias.
Is there any way to detect that git pull was run and add to it?
An ideal solution?
$ git pull
echoes out
$ This is not the prefered way of pulling down new code. Did you mean to run ~/my_scripts/git_pull_script.sh?
And then cancels the original git pull.
There's probably a simpler way to do this kind of thing, but searching around hasn't yielded much on adapting existing commands.
$PATHahead of the directory that containsgit? You could put agitscript there that does the extra checks, and then calls the realgit.