zsh-users
 help / color / mirror / code / Atom feed
* Problem after upgrade from 4.3 to 5.2
@ 2016-04-15 22:20 Henrik Johansson
  2016-04-16  0:42 ` Oliver Kiddle
  2016-04-16  4:48 ` Bart Schaefer
  0 siblings, 2 replies; 4+ messages in thread
From: Henrik Johansson @ 2016-04-15 22:20 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 766 bytes --]

Hi,

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

enable: printer "|" non-existent

enable: printer "~" non-existent

enable: printer "(" non-existent

enable: printer "?" non-existent

enable: printer "*" non-existent

enable: printer "[" non-existent

enable: printer "<" non-existent

enable: printer "^" non-existent

enable: printer "#" non-existent

                      ls -l .z

.zcompdump   .zcompdump-  .zshrc       .zshrc-      .zshrc.zni .zshrc\~

The solution seems to be an update to /etc/zshrc, I commented the 
following line:
disable enable disable

What was the purpose of 'disable enable disable', what are we missing now?

BR,
Henrik


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem after upgrade from 4.3 to 5.2
  2016-04-15 22:20 Problem after upgrade from 4.3 to 5.2 Henrik Johansson
@ 2016-04-16  0:42 ` Oliver Kiddle
  2016-04-16  4:35   ` Bart Schaefer
  2016-04-16  4:48 ` Bart Schaefer
  1 sibling, 1 reply; 4+ messages in thread
From: Oliver Kiddle @ 2016-04-16  0:42 UTC (permalink / raw)
  To: Henrik Johansson; +Cc: zsh-users

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.

> The solution seems to be an update to /etc/zshrc, I commented the 
> following line:
> disable enable disable
>
> What was the purpose of 'disable enable disable', what are we missing now?

You probably had that there so that typing enable or disable would
get you the external commands instead of the builtins. That line
disables the builtins. So if you remove that line, you'll have to type
/bin/enable explicitly to enable printers.

I'm not quite sure what the completion system is running enable for but
it probably ought to check $builtins[enable] to check for this
situation. You're probably not the only person to have the disabled
enable.

I've also run into problems with completion relying on pushd in one
place as I disable (and replace) pushd.

Oliver


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem after upgrade from 4.3 to 5.2
  2016-04-16  0:42 ` Oliver Kiddle
@ 2016-04-16  4:35   ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2016-04-16  4:35 UTC (permalink / raw)
  To: zsh-users

On Apr 16,  2:42am, Oliver Kiddle wrote:
} Subject: Re: Problem after upgrade from 4.3 to 5.2
}
} I've also run into problems with completion relying on pushd in one
} place as I disable (and replace) pushd.

Why disable it?  A function named pushd will always take precedence
over the builtin.

The only use in completion is in _canonical_paths where "builtin pushd"
is used to traverse a symlink to a directory and then return to the
original working directory.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem after upgrade from 4.3 to 5.2
  2016-04-15 22:20 Problem after upgrade from 4.3 to 5.2 Henrik Johansson
  2016-04-16  0:42 ` Oliver Kiddle
@ 2016-04-16  4:48 ` Bart Schaefer
  1 sibling, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2016-04-16  4:48 UTC (permalink / raw)
  To: zsh-users

On Apr 16, 12:20am, Henrik Johansson wrote:
}
} The solution seems to be an update to /etc/zshrc

We get into more trouble with things people throw into those /etc files.

} disable enable disable

A better solution would have been

    enable() { command enable "$@" }
    disable() { command disable "$@" }

although that still wouldn't have avoided the problem with the use of
"enable" in completion setup: changing to "builtin enable" in compinit
is definitely the right thing for us to do.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-16  4:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-15 22:20 Problem after upgrade from 4.3 to 5.2 Henrik Johansson
2016-04-16  0:42 ` Oliver Kiddle
2016-04-16  4:35   ` Bart Schaefer
2016-04-16  4:48 ` Bart Schaefer

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).