* Re: (one more) Completion question
@ 1998-01-29 20:09 Oliver Kiddle
1998-01-30 9:44 ` Andrew Main
0 siblings, 1 reply; 6+ messages in thread
From: Oliver Kiddle @ 1998-01-29 20:09 UTC (permalink / raw)
To: Zsh users mailing list
On Jan 29, 1:22pm, B.Stephens@isode.com wrote:
> I'd like the completion to be a bit stickier: I quite often find myself
> changing to some utterly uninteresting directory because there happens to be a
> directory "~/src" or something, when what I really wanted was "srcs" under the
> current directory (but of course I pressed Return too quickly).
> It's not too annoying though (I can always use popd), and I'm not even sure
> what behaviour I'd like, exactly. Perhaps the above requested behaviour would
> work: I could have cd complete first to subdirectories of the current
> directory, and only then to things under directories in cdpath?
What you say at the end is what I would do. Personally, I don't use a
$cdpath but have a few aliases which do cd from a particular directory
(cdd does a cd from home etc).
This reminded me of a suggestion that I was thinking of. I don't find
pushd and popd to be a very natuaral way of doing things. Half the time
I forget to use popd when I previously did a pushd and I often only
realise after I have gone to a new directory that I should have used
pushd.
I regularly use "cd -" to return to where I was last but often I want to
go back where I was a while ago. What I would like is to have "cd -" and
"cd +". When I cd somewhere, it would be put on a sort of stack so "cd
-" would pop the directory off the stack to return to where you have
been. Typing "cd -" again would take you not back to where you last were
but to the previous directory on the stack: "cd +" would go back to
where you were before. If you are not sure that you understand what I am
saying, I mean something like the forward and back buttons in Netscape,
where "cd -" is equivalent to back and "cd +" is equivalent to forward -
just with directories as opposed to web pages.
Another way of making it better would be a key combination (maybe Alt+Up
and Alt+Down) which would cycle through past directories if you have
typed cd on the current input line.
Does anyone have any ideas as to how these could be implemented using
functions and arrays or whatever.
Oliver Kiddle.
P.S. I seem to have deleted the e-mail about zsh 3.1.2-zefram and more
specifically the location from which it can be downloaded. Could someone
please mail me the location.
--
__
/ \|. _ _ |_/. _| _|| _ E-mail: opk101@cs.york.ac.uk
\__/||\/(-| | \|(_|(_||(- Web: http://www.york.ac.uk/~opk101/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: (one more) Completion question
1998-01-29 20:09 (one more) Completion question Oliver Kiddle
@ 1998-01-30 9:44 ` Andrew Main
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Main @ 1998-01-30 9:44 UTC (permalink / raw)
To: Oliver Kiddle; +Cc: zsh-users
Oliver Kiddle wrote:
>This reminded me of a suggestion that I was thinking of. I don't find
>pushd and popd to be a very natuaral way of doing things. Half the time
>I forget to use popd when I previously did a pushd and I often only
>realise after I have gone to a new directory that I should have used
>pushd.
setopt AUTO_PUSHD
-zefram
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: (one more) Completion question
1998-01-29 16:04 ` Wessel Dankers
@ 1998-01-29 16:22 ` Bruce Stephens
0 siblings, 0 replies; 6+ messages in thread
From: Bruce Stephens @ 1998-01-29 16:22 UTC (permalink / raw)
To: Zsh users mailing list
wsldanke@cs.ruu.nl said:
> I wrote:
> > I could have cd complete first to subdirectories of the current
> > directory, and only then to things under directories in cdpath?
> In other words: how can we prevent compctl from sorting the possible
> completions?
Yes, that's it isn't it. And how can I then use this in a natural feeling
way? i.e., even if there's a foobar in the current directory, sometimes I'll
want to know about the foo that's somewhere in my cdpath. I still don't feel
I know what I want, exactly, but not sorting would be OK as a start (if I want
foo, then I just have to know about it, and not use completion).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: (one more) Completion question
1998-01-29 13:22 ` Bruce Stephens
@ 1998-01-29 16:04 ` Wessel Dankers
1998-01-29 16:22 ` Bruce Stephens
0 siblings, 1 reply; 6+ messages in thread
From: Wessel Dankers @ 1998-01-29 16:04 UTC (permalink / raw)
To: Bruce Stephens; +Cc: Zsh users mailing list
On Thu, 29 Jan 1998, Bruce Stephens wrote:
> It's not too annoying though (I can always use popd), and I'm not even sure
> what behaviour I'd like, exactly. Perhaps the above requested behaviour would
> work: I could have cd complete first to subdirectories of the current
> directory, and only then to things under directories in cdpath?
In other words: how can we prevent compctl from sorting the possible
completions?
--
Wessel Dankers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: (one more) Completion question
1998-01-29 12:53 Andrej Borsenkow
@ 1998-01-29 13:22 ` Bruce Stephens
1998-01-29 16:04 ` Wessel Dankers
0 siblings, 1 reply; 6+ messages in thread
From: Bruce Stephens @ 1998-01-29 13:22 UTC (permalink / raw)
To: Zsh users mailing list
borsenkow.msk@sni.de said:
> Is it possible to reject current alt completion and move on to the
> next? That is, suppose with the following:
> compctl -S / -q -g '*(-/^D)' + -g '*(-/D)' + -K cdmatch cd
> if I happen to have zoo in current durectory, I would like to tell
> "no, I want zsh in ~/src"?
On a kind of related request. I use one of the cdmatch scripts, so that cd
(and pushd) complete to directories taking account of the possibility of
cdpath.
I'd like the completion to be a bit stickier: I quite often find myself
changing to some utterly uninteresting directory because there happens to be a
directory "~/src" or something, when what I really wanted was "srcs" under the
current directory (but of course I pressed Return too quickly).
It's not too annoying though (I can always use popd), and I'm not even sure
what behaviour I'd like, exactly. Perhaps the above requested behaviour would
work: I could have cd complete first to subdirectories of the current
directory, and only then to things under directories in cdpath?
^ permalink raw reply [flat|nested] 6+ messages in thread
* (one more) Completion question
@ 1998-01-29 12:53 Andrej Borsenkow
1998-01-29 13:22 ` Bruce Stephens
0 siblings, 1 reply; 6+ messages in thread
From: Andrej Borsenkow @ 1998-01-29 12:53 UTC (permalink / raw)
To: Zsh users mailing list
Is it possible to reject current alt completion and move on to the
next? That is, suppose with the following:
compctl -S / -q -g '*(-/^D)' + -g '*(-/D)' + -K cdmatch cd
if I happen to have zoo in current durectory, I would like to tell "no,
I want zsh in ~/src"? Looks useful - it gives you the ability to use
simple completion 95% of times and to move on to more complex if needed.
I think, someone has posted example, which loads completion list on the
first call; the above feature could the be used to refresh this list.
Something like
compctl -k matches_list + -K get_matches
where get_matches updates array matches_list.
-------------------------------------------------------------------------
Andrej Borsenkow Fax: +7 (095) 252 01 05
SNI ITS Moscow Tel: +7 (095) 252 13 88
NERV: borsenkow.msk E-Mail: borsenkow.msk@sni.de
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1998-01-30 10:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-29 20:09 (one more) Completion question Oliver Kiddle
1998-01-30 9:44 ` Andrew Main
-- strict thread matches above, loose matches on Subject: below --
1998-01-29 12:53 Andrej Borsenkow
1998-01-29 13:22 ` Bruce Stephens
1998-01-29 16:04 ` Wessel Dankers
1998-01-29 16:22 ` Bruce Stephens
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).