Hello,
I'm looking for documentation on the legacy ksh88 behavior for
avoiding function/alias expansion.
Here is a snippet of my $ENV
setpromp () { ... }
prompt_cd() {
\cd "${@:-$HOME}" && setprompt
}
alias cd="prompt_cd"
The backslash in front of the "cd" builtin.
That is the magic that prevents issues, solves problems.
It does the work of "command" or "builtin" in a more modern shell.
It's particularly useful is the $ENV is somehow sourced twice for a
interactive session.
Since the "cd" would have been previously aliased to a function, the
backslash forces the builtin "cd" cmd to run instead of expanding to
the alias.
To this day I still use this trick, and I believe it works with every
shell I use.
The problem statement is one of documentation.
I cannot find any old docs regarding this for legacy ksh88.
I believe the feature is relevant to ksh93 too (works for me ksh93),
so perhaps I could find the feature documented in src?
Hopefully somebody here can provide me a link for this?
Thanks!
--
-Jon
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users