Am using a case statement as a ***visually elegant way*** of excluding a potentially changing list of Global Aliases from being automatically expandedI suspect that the case-esac structure is a neglected control structure.indeed. and combined to the neglected alternative syntax (man zshmisc) (probably inspired by rc, as well as the neglected rcquote option), you have: pd () case $+1 { (0) popd ;; (*) pushd "$1" ;; }
The following excludes any single Uppercase Letter , any Alias V followed by a number, Any beginning with G
function dontExpandGlobalAlias() { if [ $# -gt 0 ] ; then case $1 in [A-Z] | V<-> | G* ) ;; *) echo "Yes expand" ;; esac fi } Just wondered if anyone had any input/improvements with or without GOLF