zsh-users
 help / color / mirror / code / Atom feed
* newbie's question about completion
@ 2001-11-08  9:37 Dan Kenigsberg
  2001-11-08  9:46 ` Will Yardley
  2001-11-08 11:01 ` Oliver Kiddle
  0 siblings, 2 replies; 11+ messages in thread
From: Dan Kenigsberg @ 2001-11-08  9:37 UTC (permalink / raw)
  To: zsh-users


Assume I have an executable in my $PATH named `armadillo'.

In versions 2.5.0 and 3.0.8 I only had to type ar<TAB> to execute it.
Since ar(1) is in my path, too, zsh would beep and let me choose between ar and
armadillo.

However in versions 3.1.9 and 4.0.2, ar<TAB> expands to `ar ', and does not give
me the opportunity to choose what I wanted. I find this very annoying.

Browsing the man and searching the web for how to revert to the old behavior
did not produce the answer. Frankly, I don't know waht to search for..

I hope someone here would help me,

	Dan.


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

* Re: newbie's question about completion
  2001-11-08  9:37 newbie's question about completion Dan Kenigsberg
@ 2001-11-08  9:46 ` Will Yardley
  2001-11-08 11:01 ` Oliver Kiddle
  1 sibling, 0 replies; 11+ messages in thread
From: Will Yardley @ 2001-11-08  9:46 UTC (permalink / raw)
  To: zsh-users

Dan Kenigsberg wrote:
> 
> Assume I have an executable in my $PATH named `armadillo'.
> 
> In versions 2.5.0 and 3.0.8 I only had to type ar<TAB> to execute it.
> Since ar(1) is in my path, too, zsh would beep and let me choose between ar and
> armadillo.
> 
> However in versions 3.1.9 and 4.0.2, ar<TAB> expands to `ar ', and does not give
> me the opportunity to choose what I wanted. I find this very annoying.
> 
> Browsing the man and searching the web for how to revert to the old behavior
> did not produce the answer. Frankly, I don't know waht to search for..
> 
> I hope someone here would help me,

just a thought; perhaps 'autolist' is set?  does it complete and add a
space or does it sit there? if you tab again will it go to the next
match?

you might explore some of (or all of) the following options (these are
the main options i have set which pertain to completion).

complete_in_word
NO_menu_complete 
NO_auto_menu 
NO_list_beep (maybe)
bash_auto_list

if that doesn't help, you might want to include the output of:
echo $PATH
echo $ZSH_VERSION
echo SHELL

and then 'which command1' and 'which command2' (with the names of the
actual commands you're having problems with)....

and the output of:
setopt

this might be helpful to those who are more knowledgable than i and
allow them to answer your question more fully.

the behaviour you're used to is definitely possible in the newer zsh
versions (pretty much anything is....).

w

-- 
GPG Public Key:
http://infinitejazz.net/will/pgp/


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

* Re: newbie's question about completion
  2001-11-08  9:37 newbie's question about completion Dan Kenigsberg
  2001-11-08  9:46 ` Will Yardley
@ 2001-11-08 11:01 ` Oliver Kiddle
  2001-11-08 11:44   ` Dan Kenigsberg
  1 sibling, 1 reply; 11+ messages in thread
From: Oliver Kiddle @ 2001-11-08 11:01 UTC (permalink / raw)
  To: Dan Kenigsberg; +Cc: zsh-users

Dan Kenigsberg wrote:
> 
> Assume I have an executable in my $PATH named `armadillo'.
> 
> In versions 2.5.0 and 3.0.8 I only had to type ar<TAB> to execute it.
> Since ar(1) is in my path, too, zsh would beep and let me choose between ar and
> armadillo.
> 
> However in versions 3.1.9 and 4.0.2, ar<TAB> expands to `ar ', and does not give
> me the opportunity to choose what I wanted. I find this very annoying.
> 
> Browsing the man and searching the web for how to revert to the old behavior
> did not produce the answer. Frankly, I don't know waht to search for..

Try: unsetopt recexact

_____________________________________________________________________
This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp


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

* Re: newbie's question about completion
  2001-11-08 11:01 ` Oliver Kiddle
@ 2001-11-08 11:44   ` Dan Kenigsberg
  2001-11-08 12:06     ` Nadav Har'El
  0 siblings, 1 reply; 11+ messages in thread
From: Dan Kenigsberg @ 2001-11-08 11:44 UTC (permalink / raw)
  To: Oliver Kiddle; +Cc: zsh-users

> 
> Dan Kenigsberg wrote:
> > 
> > Assume I have an executable in my $PATH named `armadillo'.
> > 
> > In versions 2.5.0 and 3.0.8 I only had to type ar<TAB> to execute it.
> > Since ar(1) is in my path, too, zsh would beep and let me choose between ar and
> > armadillo.
> > 
> > However in versions 3.1.9 and 4.0.2, ar<TAB> expands to `ar ', and does not give
> > me the opportunity to choose what I wanted. I find this very annoying.
> > 
> > Browsing the man and searching the web for how to revert to the old behavior
> > did not produce the answer. Frankly, I don't know waht to search for..
> 
> Try: unsetopt recexact
> 

Thanks Will and Oliver. That's exactly the answer to my anguish.

Dan.


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

* Re: newbie's question about completion
  2001-11-08 11:44   ` Dan Kenigsberg
@ 2001-11-08 12:06     ` Nadav Har'El
  2001-11-08 12:25       ` Dan Kenigsberg
  0 siblings, 1 reply; 11+ messages in thread
From: Nadav Har'El @ 2001-11-08 12:06 UTC (permalink / raw)
  To: Dan Kenigsberg; +Cc: Oliver Kiddle, zsh-users

On Thu, Nov 08, 2001, Dan Kenigsberg wrote about "Re: newbie's question about completion":
> > Try: unsetopt recexact
> 
> Thanks Will and Oliver. That's exactly the answer to my anguish.

Strange, I don't remember recexact being set by default on any version of
zsh... Is it perhaps the doing of your Linux distribution, in some file
like /etc/z*, /etc/profile.d/*, or something?

I've been sending bug reports to Redhat on almost every one of their
releases asking them to remove weird settings that they put in files like
/etc/zshrc which override's Zsh's standard defaults and confuse people
who read the manual. In Redhat 7.2, for example, they put "bindkey -e" in
/etc/zshrc. This is useless because emacs mode is the default mode anyway -
but ruins the vi default for people who set VISUAL=vi (as explained in
the zsh manual). After I reported this "bug", they said they'll remove this
setting in the next release.

-- 
Nadav Har'El                        |   Thursday, Nov  8 2001, 22 Heshvan 5762
nyh@math.technion.ac.il             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |From the Linux getopt(3) manpage: "BUGS:
http://nadav.harel.org.il           |This manpage is confusing."


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

* Re: newbie's question about completion
  2001-11-08 12:06     ` Nadav Har'El
@ 2001-11-08 12:25       ` Dan Kenigsberg
  2001-11-08 12:35         ` Nadav Har'El
  0 siblings, 1 reply; 11+ messages in thread
From: Dan Kenigsberg @ 2001-11-08 12:25 UTC (permalink / raw)
  To: Nadav Har'El; +Cc: zsh-users

> 
> On Thu, Nov 08, 2001, Dan Kenigsberg wrote about "Re: newbie's question about completion":
> > > Try: unsetopt recexact
> > 
> > Thanks Will and Oliver. That's exactly the answer to my anguish.
> 
> Strange, I don't remember recexact being set by default on any version of
> zsh... Is it perhaps the doing of your Linux distribution, in some file
> like /etc/z*, /etc/profile.d/*, or something?
> 

This is SuSe 7.0 that has setopt recexact in its /etc/zshrc (arghhh).
My problem had nothing to do with zsh versions..

Recently, I found a truer "bug" in SuSe's startup files: /etc/profile
sets alias ls='eval /bin/ls $LS_OPTIONS'.
Appart of the question whether it is sensible to expand $LS_OPTIONS every time
you do ls, this distroys arguments with spaces. (confession: I do not fully
understand why)
Anyway, my solution for that was alias ls='ls `echo $LS_OPTIONS`'.


Dan.

(Nadav, it seems I'm following you everywhere..)


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

* Re: newbie's question about completion
  2001-11-08 12:25       ` Dan Kenigsberg
@ 2001-11-08 12:35         ` Nadav Har'El
  2001-11-08 13:47           ` Vincent Lefevre
  0 siblings, 1 reply; 11+ messages in thread
From: Nadav Har'El @ 2001-11-08 12:35 UTC (permalink / raw)
  To: Dan Kenigsberg; +Cc: zsh-users

On Thu, Nov 08, 2001, Dan Kenigsberg wrote about "Re: newbie's question about completion":
> This is SuSe 7.0 that has setopt recexact in its /etc/zshrc (arghhh).
> My problem had nothing to do with zsh versions..

I don't understand why distributions do this... Zsh has a set of defaults
and these are clearly explained in the manual; If a distribution overrides
this default, it leaves the user clueless why the behavior described in
the manual is not happening. And why do they think that their defaults
make more sense than the defaults decided upon by the zsh developers?

I recommend you send a bug report to SuSe and ask them to remove this
silly setting.

> Recently, I found a truer "bug" in SuSe's startup files: /etc/profile
> sets alias ls='eval /bin/ls $LS_OPTIONS'.
> Appart of the question whether it is sensible to expand $LS_OPTIONS every time
> you do ls, this distroys arguments with spaces. (confession: I do not fully
> understand why)

The "eval" indeed reparses the whole line and rebreaks it on spaces ($IFS,
actually)... What they probably meant to do was to only break LS_OPTIONS,
in which case they should do

	alias ls='\ls ${=LS_OPTIONS}'

(the ${=...} enables SH_WORD_SPLIT for this time only - see the zsh manual.
the \ls is used instead of /bin/ls to find ls wherever it is - not necessarily
/bin).

Of course, this solution works only in zsh, so it should be placed in
/etc/zprofile, not /etc/profile. Or use the solution you described which
works on any Bourne-like shell.

> (Nadav, it seems I'm following you everywhere..)

Don't you know that I subscribe to every mailing list in existance? :)

-- 
Nadav Har'El                        |   Thursday, Nov  8 2001, 22 Heshvan 5762
nyh@math.technion.ac.il             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |Despite the cost of living, have you
http://nadav.harel.org.il           |noticed how it remains so popular?


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

* Re: newbie's question about completion
  2001-11-08 12:35         ` Nadav Har'El
@ 2001-11-08 13:47           ` Vincent Lefevre
  2001-11-08 13:56             ` Peter Stephenson
  2001-11-08 14:15             ` Mads Martin Joergensen
  0 siblings, 2 replies; 11+ messages in thread
From: Vincent Lefevre @ 2001-11-08 13:47 UTC (permalink / raw)
  To: Dan Kenigsberg; +Cc: zsh-users

In article <20011108143515.A14099@leeor.math.technion.ac.il>,
   Nadav Har'El <nyh@math.technion.ac.il> wrote:

> I don't understand why distributions do this... Zsh has a set of defaults
> and these are clearly explained in the manual; If a distribution overrides
> this default, it leaves the user clueless why the behavior described in
> the manual is not happening.

I entirely agree. Sometimes, this is worse, as things in /etc/zshrc
override the user's settings in his ~/.zshenv! For instance, in
SuSE 7.2, /etc/profile is sourced in /etc/zshrc, and this overrides
the path the user has set in his zshenv. Really annoying...

> And why do they think that their defaults make more sense than the defaults
> decided upon by the zsh developers?

Or perhaps zsh's default should be not to source the system files,
perhaps except /etc/zshenv?

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


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

* Re: newbie's question about completion
  2001-11-08 13:47           ` Vincent Lefevre
@ 2001-11-08 13:56             ` Peter Stephenson
  2001-11-08 14:35               ` Vincent Lefevre
  2001-11-08 14:15             ` Mads Martin Joergensen
  1 sibling, 1 reply; 11+ messages in thread
From: Peter Stephenson @ 2001-11-08 13:56 UTC (permalink / raw)
  To: Zsh users list

(Sorry, this will appear twice on zsh-workers since I originally sent in there,
when it should obviously go to zsh-users.)

Vincent Lefevre wrote:
> Or perhaps zsh's default should be not to source the system files,
> perhaps except /etc/zshenv?

You can get this effect by `setopt noglobalrcs' in .zshenv.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


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

* Re: newbie's question about completion
  2001-11-08 13:47           ` Vincent Lefevre
  2001-11-08 13:56             ` Peter Stephenson
@ 2001-11-08 14:15             ` Mads Martin Joergensen
  1 sibling, 0 replies; 11+ messages in thread
From: Mads Martin Joergensen @ 2001-11-08 14:15 UTC (permalink / raw)
  To: Vincent Lefevre; +Cc: Dan Kenigsberg, zsh-users

* Vincent Lefevre <vincent@vinc17.org> [Nov 08. 2001 14:56]:
> In article <20011108143515.A14099@leeor.math.technion.ac.il>,
>    Nadav Har'El <nyh@math.technion.ac.il> wrote:
> 
> > I don't understand why distributions do this... Zsh has a set of defaults
> > and these are clearly explained in the manual; If a distribution overrides
> > this default, it leaves the user clueless why the behavior described in
> > the manual is not happening.
> 
> I entirely agree. Sometimes, this is worse, as things in /etc/zshrc
> override the user's settings in his ~/.zshenv! For instance, in
> SuSE 7.2, /etc/profile is sourced in /etc/zshrc, and this overrides
> the path the user has set in his zshenv. Really annoying...

That have been fixed :-)

-- 
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogic, with just a little bit more effort."
                                -- A. P. J.


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

* Re: newbie's question about completion
  2001-11-08 13:56             ` Peter Stephenson
@ 2001-11-08 14:35               ` Vincent Lefevre
  0 siblings, 0 replies; 11+ messages in thread
From: Vincent Lefevre @ 2001-11-08 14:35 UTC (permalink / raw)
  To: Zsh users list

On Thu, Nov 08, 2001 at 13:56:20 +0000, Peter Stephenson wrote:
> Vincent Lefevre wrote:
> > Or perhaps zsh's default should be not to source the system files,
> > perhaps except /etc/zshenv?
> 
> You can get this effect by `setopt noglobalrcs' in .zshenv.

I wanted to say that it could be the *default*. I don't know if this
is a good idea or not...

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


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

end of thread, other threads:[~2001-11-08 14:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-08  9:37 newbie's question about completion Dan Kenigsberg
2001-11-08  9:46 ` Will Yardley
2001-11-08 11:01 ` Oliver Kiddle
2001-11-08 11:44   ` Dan Kenigsberg
2001-11-08 12:06     ` Nadav Har'El
2001-11-08 12:25       ` Dan Kenigsberg
2001-11-08 12:35         ` Nadav Har'El
2001-11-08 13:47           ` Vincent Lefevre
2001-11-08 13:56             ` Peter Stephenson
2001-11-08 14:35               ` Vincent Lefevre
2001-11-08 14:15             ` Mads Martin Joergensen

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