Command expansionAn kind of expansion whichzsh provides and which one may miss in other
shells is command expansion. In zsh , an expression of the form
=name is replaced by the absolute path of the command
name , provided that it can be found by searching $PATH .
This allows, for example, editing executable scripts without knowing their
absolute location.
Of course one can always use expressions of the kind vi $(which script) As a substitue for command expansion I wrote a function with the
minimalistic name _p_complete and a complete
command for the bash completion mechanism. Their effect is that
any parameter representing the name of an executable file will be
changed into an absolute path by pressing the tab key.
Examples:
|