* .. completion
@ 2001-06-16 17:52 Danijel Tasov
2001-06-16 20:40 ` Bart Schaefer
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Danijel Tasov @ 2001-06-16 17:52 UTC (permalink / raw)
To: zsh-users
[-- Attachment #1: Type: text/plain, Size: 669 bytes --]
Hello World,
I'm an enthused zsh-user.
I have a Problem with compctl. I don't use any completion
control, but there is something that bothers me.
When I type /us it will be completed to /usr/ when pressing TAB,
but .. will not be completed to ../ like in tcsh. I'm sure there
is one, but compctl is very cryptic to me, and this is the only
thing I miss.
bye,
Da.Ta.
--
Danijel Tasov, danielt@camelot.de. PGP-Fingerprint:
00 3A 65 0C 47 66 46 27 E2 AF 3A C4 1C 2E E8 EE
Neues bei CameloT - http://www.camelot.de/news/
# "Karen has her own i, and she is not going to let Frank put his
# data into it."
# - F. D. Boswell Computer Science 240
[-- Attachment #2: Type: application/pgp-signature, Size: 524 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: .. completion
2001-06-16 17:52 .. completion Danijel Tasov
@ 2001-06-16 20:40 ` Bart Schaefer
2001-06-16 21:38 ` Danijel Tasov
2001-06-18 7:50 ` Sven Wischnowsky
2 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2001-06-16 20:40 UTC (permalink / raw)
To: Danijel Tasov, zsh-users
On Jun 16, 7:52pm, Danijel Tasov wrote:
}
} When I type /us it will be completed to /usr/ when pressing TAB,
} but .. will not be completed to ../ like in tcsh.
Zsh tends to ignore '..' on the grounds that you only have to type one
character either way, so it's not a hardship to type '/' instead of TAB.
In 4.0.1 with the `compinit' system installed, you can fix this in some
contexts by using:
zstyle ':completion:*' special-dirs ".."
I say "in some contexts" because the special-dirs style applies only when
completing path names or directories, not when completing file names. So
the above style will allow '..' to complete to '../' after 'cd', but not
after 'ls' (for example). This is probably a bug.
To zsh-workers:
In _path_files, the special-dirs style is looked up only as a string, but
the documentation says it may be either a string or a boolean. Then the
string is used only if there's already a '/' on the line or if the -f or
-/ options were given.
However, in _files, _path_files is always called with -g option, so the
special-dirs style doesn't work at all for _files.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: .. completion
2001-06-16 17:52 .. completion Danijel Tasov
2001-06-16 20:40 ` Bart Schaefer
@ 2001-06-16 21:38 ` Danijel Tasov
2001-06-18 7:50 ` Sven Wischnowsky
2 siblings, 0 replies; 4+ messages in thread
From: Danijel Tasov @ 2001-06-16 21:38 UTC (permalink / raw)
To: Danijel Tasov; +Cc: zsh-users
[-- Attachment #1: Type: text/plain, Size: 646 bytes --]
Hello,
On Sat, Jun 16, 2001 at 07:52:36PM +0200, Danijel Tasov wrote:
> When I type /us it will be completed to /usr/ when pressing TAB,
> but .. will not be completed to ../ like in tcsh. I'm sure there
^
There is a sentence missing :) Something like, "Is there any
solution?" or so ;)
> is one, but compctl is very cryptic to me, and this is the only
bye,
Da. "To drunken to write" Ta.
--
Danijel Tasov, danielt@camelot.de. PGP-Fingerprint:
00 3A 65 0C 47 66 46 27 E2 AF 3A C4 1C 2E E8 EE
Neues bei CameloT - http://www.camelot.de/news/
# Homer: "Can't talk. Eating."
[-- Attachment #2: Type: application/pgp-signature, Size: 524 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: .. completion
2001-06-16 17:52 .. completion Danijel Tasov
2001-06-16 20:40 ` Bart Schaefer
2001-06-16 21:38 ` Danijel Tasov
@ 2001-06-18 7:50 ` Sven Wischnowsky
2 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 2001-06-18 7:50 UTC (permalink / raw)
To: zsh-users
Danijel Tasov wrote:
> Hello World,
>
> I'm an enthused zsh-user.
>
> I have a Problem with compctl. I don't use any completion
> control, but there is something that bothers me.
>
> When I type /us it will be completed to /usr/ when pressing TAB,
> but .. will not be completed to ../ like in tcsh. I'm sure there
> is one, but compctl is very cryptic to me, and this is the only
> thing I miss.
Bart already pointed you to the new completion system.
If, for some reason, you can't use that, the way to make completion with
compctl accept `..' as a possible match (which in turn makes it add the
slash) is to add `-g ".."' to all your compctl's that generate filenames
as possible matches (using the -f, -/ or -g options -- in the last case
you can just add the `..' to -g's already existing argument).
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-06-18 7:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-16 17:52 .. completion Danijel Tasov
2001-06-16 20:40 ` Bart Schaefer
2001-06-16 21:38 ` Danijel Tasov
2001-06-18 7:50 ` Sven Wischnowsky
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).