summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-11-24 06:57:51 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-11-28 07:16:37 +0000
commit3a8727dc6bae5fd762256cbccdde55b75bed8769 (patch)
treece1209e3fbc46b9b27377929711a75255a031dde
parenteccb7471b577d55f0b410088fc1125016476b332 (diff)
downloadzsh-3a8727dc6bae5fd762256cbccdde55b75bed8769.tar.gz
zsh-3a8727dc6bae5fd762256cbccdde55b75bed8769.zip
40009: alias -L: Emit aliases that begin with a plus sign correctly.
-rw-r--r--ChangeLog5
-rw-r--r--Src/hashtable.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ab1852e6d..88727c93b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-11-28 Daniel Shahaf <d.s@daniel.shahaf.name>
+
+ * 40009: Src/hashtable.c: alias -L: Emit aliases that begin
+ with a plus sign correctly.
+
2016-11-24 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 40013: Completion/Unix/Type/_date_formats,
diff --git a/Src/hashtable.c b/Src/hashtable.c
index 2d5af5be0..7c3367568 100644
--- a/Src/hashtable.c
+++ b/Src/hashtable.c
@@ -1291,9 +1291,9 @@ printaliasnode(HashNode hn, int printflags)
else if (a->node.flags & ALIAS_GLOBAL)
printf("-g ");
- /* If an alias begins with `-', then we must output `-- ' *
+ /* If an alias begins with `-' or `+', then we must output `-- '
* first, so that it is not interpreted as an option. */
- if(a->node.nam[0] == '-')
+ if(a->node.nam[0] == '-' || a->node.nam[0] == '+')
printf("-- ");
}