Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Use of "enable" in compsys (Re: Problem after upgrade from 4.3 to 5.2)
- X-seq: zsh-workers 38289
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Use of "enable" in compsys (Re: Problem after upgrade from 4.3 to 5.2)
- Date: Fri, 15 Apr 2016 21:31:13 -0700
- Cc: Henrik Johansson <henrik.johansson.kank@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject:cc :mime-version; bh=+D4nGL1Fpgoe8W3migDCwMqEhnGkSuhvnksz9KVsHyc=; b=IZ7I4bHiufS3geALqFyPg7ZR6SH0KfNxNTKWd+367uxyNlvbfAlJ5MH+ewxMw8/PuG bIQXVwZe1G41UafAh7h4V3+9mCyXddFQeZzf+S41eHwoXi3i+2XS9etLxsgtylETGtX0 zPj2XjMdW9Qy0D9uQwVOVlWI6gnmH2NKw22/8dTD6KwIDGEZ5TOeY4kzLa9jeNEEQ+WE im4vNFPgSV+wDLA+eEzoh9pXBBC5vjx5AfI0hTlNFc+Jg4RtpNYWyrVNr4un51M1KVhr TbbH8Kpmo9lp5VB/HGHUmgirjrA/GCSOiRJaYrMYs8SIj07zyGAyWJpyUm5iW/IqxvLU 1IVQ==
- In-reply-to: <12614.1460767375@thecus.kiddle.eu>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <57116948.903@mail.se> <12614.1460767375@thecus.kiddle.eu>
On Apr 16, 2:42am, Oliver Kiddle wrote:
} Subject: Re: Problem after upgrade from 4.3 to 5.2
}
} Henrik Johansson wrote:
} >
} > After upgrade of zsh I got a problem with completion.
} > In this example I write 'ls -l .z<TAB>
} >
} > server.user 1045> ls -l .zenable: printer "-p" non-existent
}
} There's a name clash for "enable" / "disable" between the shell builtins
} and external commands for enabling/disabling printers.
Seems like there ought to be a way to invoke a disabled builtin, at least
in the case of enable, but we can easily avoid Henrik's error. Additional
changes below are to use explicit semicolons on all lines in _comp_setup,
I'm not sure why those were used on some of them but not others, but it
seems prudent to have them.
diff --git a/Completion/compinit b/Completion/compinit
index 4b9a778..6612bac 100644
--- a/Completion/compinit
+++ b/Completion/compinit
@@ -167,11 +167,11 @@ _comp_options=(
typeset -gH _comp_setup='local -A _comp_caller_options;
_comp_caller_options=(${(kv)options[@]});
setopt localoptions localtraps localpatterns ${_comp_options[@]};
- local IFS=$'\'\ \\t\\r\\n\\0\''
- enable -p \| \~ \( \? \* \[ \< \^ \#
+ local IFS=$'\'\ \\t\\r\\n\\0\'';
+ builtin enable -p \| \~ \( \? \* \[ \< \^ \# 2>/dev/null;
exec </dev/null;
- trap - ZERR
- local -a reply
+ trap - ZERR;
+ local -a reply;
local REPLY'
# These can hold names of functions that are to be called before/after all
--
Barton E. Schaefer
Messages sorted by:
Reverse Date,
Date,
Thread,
Author