From 3a8727dc6bae5fd762256cbccdde55b75bed8769 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 24 Nov 2016 06:57:51 +0000 Subject: 40009: alias -L: Emit aliases that begin with a plus sign correctly. --- Src/hashtable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Src') 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("-- "); } -- cgit 1.4.1