* bash like tab tab 's
@ 1996-08-27 8:34 Duncan Sargeant
1996-08-27 9:23 ` Bart Schaefer
0 siblings, 1 reply; 5+ messages in thread
From: Duncan Sargeant @ 1996-08-27 8:34 UTC (permalink / raw)
To: zsh-users
In the brief period between installing Linux and changing the default
shell to zsh, I noticed bash's tab tab feature, where pressing tab once
will try to complete a word as per usual, but if it can't, pressing it a
second time will give a list of commands. It is equivalent to pressing
TAB then ^D, but I like it just that little bit better.
The FAQ gave just about every other possibility of completion config, but
I couldn't find this particular one.
Can anyone help with this?
thanks.
Duncan Sargeant, http://www.ucc.gu.uwa.edu.au/~dunc/
"You can pick your friends and you can pick your
nose, but you can't pick your friend's nose."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bash like tab tab 's
1996-08-27 8:34 bash like tab tab 's Duncan Sargeant
@ 1996-08-27 9:23 ` Bart Schaefer
1996-08-27 9:31 ` Duncan Sargeant
1996-08-27 18:53 ` Zefram
0 siblings, 2 replies; 5+ messages in thread
From: Bart Schaefer @ 1996-08-27 9:23 UTC (permalink / raw)
To: Duncan Sargeant, zsh-users
On Aug 27, 4:34pm, Duncan Sargeant wrote:
} Subject: bash like tab tab 's
}
} In the brief period between installing Linux and changing the default
} shell to zsh, I noticed bash's tab tab feature, where pressing tab once
} will try to complete a word as per usual, but if it can't, pressing it a
} second time will give a list of commands.
I think you want
setopt autolist listambiguous
While we're on the subject of just-noticed features in other shells, I
just noticed that tcsh's `complete' command can take a glob pattern for
the name of the command(s) to which the programmable completion should
apply. Does anybody think this would be useful enough to add to zsh?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.nbn.com/people/lantern
New male in /home/schaefer:
>N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bash like tab tab 's
1996-08-27 9:23 ` Bart Schaefer
@ 1996-08-27 9:31 ` Duncan Sargeant
1996-08-27 9:48 ` Bart Schaefer
1996-08-27 18:53 ` Zefram
1 sibling, 1 reply; 5+ messages in thread
From: Duncan Sargeant @ 1996-08-27 9:31 UTC (permalink / raw)
To: schaefer; +Cc: dunc, zsh-users
> } Subject: bash like tab tab 's
> }
> } In the brief period between installing Linux and changing the default
> } shell to zsh, I noticed bash's tab tab feature, where pressing tab once
> } will try to complete a word as per usual, but if it can't, pressing it a
> } second time will give a list of commands.
>
> I think you want
>
> setopt autolist listambiguous
>
that's does a list after the first TAB. I was interested in having it
complete as far as possible first, beep, then (after second TAB) list.
> While we're on the subject of just-noticed features in other shells, I
> just noticed that tcsh's `complete' command can take a glob pattern for
> the name of the command(s) to which the programmable completion should
> apply. Does anybody think this would be useful enough to add to zsh?
sounds groovy.
Duncan Sargeant, http://www.ucc.gu.uwa.edu.au/~dunc/
"All extremists should be shot."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bash like tab tab 's
1996-08-27 9:31 ` Duncan Sargeant
@ 1996-08-27 9:48 ` Bart Schaefer
0 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 1996-08-27 9:48 UTC (permalink / raw)
To: Duncan Sargeant; +Cc: dunc, zsh-users
On Aug 27, 5:31pm, Duncan Sargeant wrote:
} Subject: Re: bash like tab tab 's
}
} > } I noticed bash's tab tab feature, where pressing tab once
} > } will try to complete a word as per usual, but if it can't, pressing it a
} > } second time will give a list of commands.
} >
} > I think you want
} >
} > setopt autolist listambiguous
}
} that's does a list after the first TAB. I was interested in having it
} complete as far as possible first, beep, then (after second TAB) list.
`setopt autolist` lists after the first tab on any ambiguous competion.
If you add `setopt listambiguous` then it completes as far as possible
and lists only if "as far as possible" means "no further".
This is as close as you can get; it saves you having to type the second
tab when the completion is immediately ambiguous, which is (partly) why
it works this way.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.nbn.com/people/lantern
New male in /home/schaefer:
>N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bash like tab tab 's
1996-08-27 9:23 ` Bart Schaefer
1996-08-27 9:31 ` Duncan Sargeant
@ 1996-08-27 18:53 ` Zefram
1 sibling, 0 replies; 5+ messages in thread
From: Zefram @ 1996-08-27 18:53 UTC (permalink / raw)
To: schaefer; +Cc: dunc, zsh-users
>} In the brief period between installing Linux and changing the default
>} shell to zsh, I noticed bash's tab tab feature, where pressing tab once
>} will try to complete a word as per usual, but if it can't, pressing it a
>} second time will give a list of commands.
I thought zsh could do this, but I can't find the right combination of
options for it. I don't actually like the bash behaviour, but we
really ought to be able to emulate it. Whoever does add this
capability, be very careful -- the logic controlling when the list is
displayed is quite horrendous as it is.
>While we're on the subject of just-noticed features in other shells, I
>just noticed that tcsh's `complete' command can take a glob pattern for
>the name of the command(s) to which the programmable completion should
>apply. Does anybody think this would be useful enough to add to zsh?
Not as another special case. But I have some vague plans for a more
general programmable completion mechanism that could allow this among
other things -- I'll post some specific designs (to zsh-workers) in a
few days or so.
-zefram
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1996-08-27 19:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-08-27 8:34 bash like tab tab 's Duncan Sargeant
1996-08-27 9:23 ` Bart Schaefer
1996-08-27 9:31 ` Duncan Sargeant
1996-08-27 9:48 ` Bart Schaefer
1996-08-27 18:53 ` Zefram
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).