Suffix aliases are the only reason I'm going to switch to ZSH, but I want to stick with bash. So, is it possible to have something like suffix aliases in bash?
For those who donβt know what the suffix alias is, in ZSH
$ alias -s cpp=vi $ filename.cpp
will start vi with filename.cpp as the first argument.
Please note that something like xdg-open or gnome-open is not enough. I want bash to execute a command when entering a file name.
Completion is very important to me. Therefore, if the beginning of the file name is typed, it would be nice if the rest of the file name was filled when the TAB key was pressed.
source share