Commit 1ba2fac0 authored by Daniel Shahaf's avatar Daniel Shahaf

36403: type -w += suffix alias

This makes 'type -w' distinguish suffix aliases from regular aliases,
like bare 'type' already does.

Use-case: detecting programmatically whether the command word is indeed
a valid command word (see <>)
parent 8dfdca8a
2015-09-03 Daniel Shahaf <>
* 36403: Src/hashtable.c Test/A02alias.ztst: type -w +=
suffix alias
2015-09-02 Barton E. Schaefer <>
* unposted: Test/A05execution.ztst: test for 36393
......@@ -1234,7 +1234,10 @@ printaliasnode(HashNode hn, int printflags)
if (printflags & PRINT_WHENCE_WORD) {
printf("%s: alias\n", a->node.nam);
if (a->node.flags & ALIAS_SUFFIX)
printf("%s: suffix alias\n", a->node.nam);
printf("%s: alias\n", a->node.nam);
......@@ -91,5 +91,8 @@
0:unalias -a
alias -s foo=print
type; type -w
unalias -as
0:unalias -as
>foo is a suffix alias for print
>foo: suffix alias
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment