mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-11 00:51:05 +02:00
42146: type -w += global aliases
Follow-up to 36403, which did the same for suffix aliases.
This commit is contained in:
parent
a254c1815a
commit
4b55c0f40c
3 changed files with 16 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
||||||
2017-12-20 Daniel Shahaf <d.s@daniel.shahaf.name>
|
2017-12-20 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||||
|
|
||||||
|
* 42146: Src/hashtable.c, Test/A02alias.ztst: type -w +=
|
||||||
|
global aliases
|
||||||
|
|
||||||
* 42138: Completion/Unix/Command/_git: _git-revert: Complete
|
* 42138: Completion/Unix/Command/_git: _git-revert: Complete
|
||||||
recent commits first.
|
recent commits first.
|
||||||
|
|
||||||
|
|
|
@ -1261,6 +1261,8 @@ printaliasnode(HashNode hn, int printflags)
|
||||||
if (printflags & PRINT_WHENCE_WORD) {
|
if (printflags & PRINT_WHENCE_WORD) {
|
||||||
if (a->node.flags & ALIAS_SUFFIX)
|
if (a->node.flags & ALIAS_SUFFIX)
|
||||||
printf("%s: suffix alias\n", a->node.nam);
|
printf("%s: suffix alias\n", a->node.nam);
|
||||||
|
else if (a->node.flags & ALIAS_GLOBAL)
|
||||||
|
printf("%s: global alias\n", a->node.nam);
|
||||||
else
|
else
|
||||||
printf("%s: alias\n", a->node.nam);
|
printf("%s: alias\n", a->node.nam);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -137,3 +137,14 @@
|
||||||
thisworks)
|
thisworks)
|
||||||
0:NO_ALIAS_FUNC_DEF works if the alias is a complete definition
|
0:NO_ALIAS_FUNC_DEF works if the alias is a complete definition
|
||||||
>That worked
|
>That worked
|
||||||
|
|
||||||
|
type \bar
|
||||||
|
type -w \bar
|
||||||
|
type \\bar
|
||||||
|
type -w \\bar
|
||||||
|
0:type -w of alias -g
|
||||||
|
>bar is a global alias for echo
|
||||||
|
>bar: global alias
|
||||||
|
>\bar is an alias for echo
|
||||||
|
>\bar: alias
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue