From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Cc: Henrik Johansson <henrik.johansson.kank@mail.se>
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 [thread overview]
Message-ID: <160415213113.ZM22069@torch.brasslantern.com> (raw)
In-Reply-To: <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
parent reply other threads:[~2016-04-16 4:31 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <12614.1460767375@thecus.kiddle.eu>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=160415213113.ZM22069@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=henrik.johansson.kank@mail.se \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).