I'd like to change my Bash configuration, so when I type something (e.g. foo bar
) in the command prompt, it really executes h foo bar
.
I want to do it because I often use hilite (aliased as h
) to color stderr in red, and I would like to make this behaviour permanent.
Other use I see would be interacting with Git, as I write lots of commands like:
git status
git add ...
git commit ...
I guess I could use preexec_invoke_exec
to execute something before
the command is being run, but I don't know how can I change the
command or prevent it from executing.
Any ideas?