zsh-users
 help / color / mirror / code / Atom feed
* question
@ 2018-03-02  3:48 ` Quolick
  2018-03-02  4:34   ` question lilydjwg
                     ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Quolick @ 2018-03-02  3:48 UTC (permalink / raw)
  To: zsh-users

Hi all!

Maybe there is a well-known script...
Here is what I want.
Wow to see last ~10 directories I've been at, then interactively pick one and CD to it?


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

* Re: question
  2018-03-02  3:48 ` question Quolick
@ 2018-03-02  4:34   ` lilydjwg
  2018-03-02 12:00     ` question Vincent Bernat
  2018-03-02  4:38   ` question Ray Andrews
  2018-03-02  9:05   ` question Peter Stephenson
  2 siblings, 1 reply; 13+ messages in thread
From: lilydjwg @ 2018-03-02  4:34 UTC (permalink / raw)
  To: zsh-users

On Fri, Mar 02, 2018 at 04:48:35AM +0100, Quolick wrote:
> Hi all!
> 
> Maybe there is a well-known script...
> Here is what I want.
> Wow to see last ~10 directories I've been at, then interactively pick one and CD to it?

cd ~-<Tab><Tab>

-- 
Best regards,
lilydjwg


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

* Re: question
  2018-03-02  3:48 ` question Quolick
  2018-03-02  4:34   ` question lilydjwg
@ 2018-03-02  4:38   ` Ray Andrews
  2018-03-02  9:05   ` question Peter Stephenson
  2 siblings, 0 replies; 13+ messages in thread
From: Ray Andrews @ 2018-03-02  4:38 UTC (permalink / raw)
  To: zsh-users

On 01/03/18 07:48 PM, Quolick wrote:
> Hi all!
>
> Maybe there is a well-known script...
> Here is what I want.
> Wow to see last ~10 directories I've been at, then interactively pick one and CD to it?
>
>
Sebastian Gniazdowski's n-tools does that.  'n-cd' to be exact.  I 
hugely rewrote it for my own use, but the original is very satisfactory.


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

* Re: question
  2018-03-02  3:48 ` question Quolick
  2018-03-02  4:34   ` question lilydjwg
  2018-03-02  4:38   ` question Ray Andrews
@ 2018-03-02  9:05   ` Peter Stephenson
  2 siblings, 0 replies; 13+ messages in thread
From: Peter Stephenson @ 2018-03-02  9:05 UTC (permalink / raw)
  To: zsh-users

On Fri, 2 Mar 2018 04:48:35 +0100
Quolick <quolick@conus.info> wrote:
> Maybe there is a well-known script...
> Here is what I want.
> Wow to see last ~10 directories I've been at, then interactively pick
> one and CD to it?

If you're happy picking one using completion, search for "cdr" in the
zshcompsys manual.

pws


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

* Re: question
  2018-03-02  4:34   ` question lilydjwg
@ 2018-03-02 12:00     ` Vincent Bernat
  0 siblings, 0 replies; 13+ messages in thread
From: Vincent Bernat @ 2018-03-02 12:00 UTC (permalink / raw)
  To: lilydjwg; +Cc: zsh-users

 ❦  2 mars 2018 12:34 +0800, lilydjwg <lilydjwg@gmail.com> :

>> Maybe there is a well-known script...
>> Here is what I want.
>> Wow to see last ~10 directories I've been at, then interactively pick one and CD to it?
>
> cd ~-<Tab><Tab>

Or just "cd +<Tab><Tab>"
-- 
It has long been an axiom of mine that the little things are infinitely
the most important.
		-- Sir Arthur Conan Doyle, "A Case of Identity"


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

* Re: question
  1998-03-09 16:01     ` question Mircea Damian
  1998-03-09 17:30       ` question Bart Schaefer
@ 1998-03-10 11:04       ` Stephen Marley
  1 sibling, 0 replies; 13+ messages in thread
From: Stephen Marley @ 1998-03-10 11:04 UTC (permalink / raw)
  To: zsh-users

Quoting Mircea Damian (dmircea@mail.kappa.ro):
> Another issue:
>  There is a problem in zsh-3.0.5 which I can't reproduce it. Sometimes, not
>  very often, it happens to exit unexpectedly from my session. It seems that
> it executes the commands found in .zlogout it. Last time when I saw that my
> last command was: 
> 
> 
> dmircea@mail:/home/dmircea% echo "somth";ls
> 
> The output was something like:
> somth
> ... {ls output} ...
> dmircea@mail:/home/dmircea% logout
> Logout
> 
> 
> 
> The last string("Logout") was printed by .zlogout with an echo command.
> 
> I use zsh-3.0.5 on a Linux 2.0.33 running on a Intel P200. Any hints?

This sounds suspiciously like the problem I reported a while ago when
my xterm would mysteriously disappear as I typed. The was a message
on the screen that I didn't have time to read but I am sure the
word .zlogout was in there. I have never been able to reproduce this
but it still happens very infrequently. BTW I am using an unpatched
3.0.5 on Solaris 2.6.

-- 
stephen@memex.com


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

* Re: question
@ 1998-03-09 18:46 Niall Smart
  0 siblings, 0 replies; 13+ messages in thread
From: Niall Smart @ 1998-03-09 18:46 UTC (permalink / raw)
  To: Bart Schaefer, Mircea Damian, zsh-users

On Mar 9,  9:30am, "Bart Schaefer" wrote:
} Subject: Re: question
> On Mar 9,  6:01pm, Mircea Damian wrote:
> } Subject: Re: question
> }
> } Another issue:
> }  There is a problem in zsh-3.0.5 which I can't reproduce it. Sometimes, not
> } very often, it happens to exit unexpectedly from my session.
> 
> Have you by any chance applied a patch for the HIST_REDUCE_BLANKS option?
> The most recently posted version of that patch -- which was quite a while
> ago, admittedly -- applies (IIRC) without rejections to zsh-3.0.x, but
> introduces a bug that causes the shell to exit as soon as the length of
> the history exactly equals HISTSIZE.  
> 
> However, I doubt that's the problem ... the only place in the code that
> I can find that would print the string "logout" on the same line as the
> prompt, like you showed here:
> 
> } dmircea@mail:/home/dmircea% logout
> 
> Is this bit of init.c:

I though Mircea said he had put "echo logout" in his .zshlogout?
I deleted the original post...


Niall


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

* Re: question
  1998-03-09 17:30       ` question Bart Schaefer
@ 1998-03-09 17:42         ` Mircea Damian
  0 siblings, 0 replies; 13+ messages in thread
From: Mircea Damian @ 1998-03-09 17:42 UTC (permalink / raw)
  To: Bart Schaefer, Mircea Damian, zsh-users

On Mon, Mar 09, 1998 at 09:30:33AM -0800, Bart Schaefer wrote:
> On Mar 9,  6:01pm, Mircea Damian wrote:
> } Subject: Re: question
> }
> } Another issue:
> }  There is a problem in zsh-3.0.5 which I can't reproduce it. Sometimes, not
> } very often, it happens to exit unexpectedly from my session.
> 
> Have you by any chance applied a patch for the HIST_REDUCE_BLANKS option?
> The most recently posted version of that patch -- which was quite a while
> ago, admittedly -- applies (IIRC) without rejections to zsh-3.0.x, but
> introduces a bug that causes the shell to exit as soon as the length of
> the history exactly equals HISTSIZE.  
> 
> However, I doubt that's the problem ... the only place in the code that
> I can find that would print the string "logout" on the same line as the
> prompt, like you showed here:
> 
> } dmircea@mail:/home/dmircea% logout
> 
> Is this bit of init.c:
> 
> 	if (!(isset(IGNOREEOF) && interact)) {
> #if 0
> 	    if (interact)
> 		fputs(islogin ? "logout\n" : "exit\n", stderr);
> #endif
> 	    zexit(lastval, 0);
> 	    continue;
> 	}
> 
> That would mean that (1) you've changed the `#if 0' to get that code to
> compile and (2) zsh is seeing end-of-file on the terminal.  You might want
> to try "setopt ignoreeof" and just to see what happens.
AFAIK the archive that I used was a clean one. I don't remember exactly
were I download it.

I'm sure that "setopt ignoreeof" will solve this problem but I do like to
exit from my session with ^D.

If it will happen again may be I'm gonna make some investigation(I'm very
busy... I'm student too).


-- 
Mircea Damian
Kappa Administrator
dmircea@roedu.net, dmircea@lbi.ro, dmircea@kappa.ro
MD65-RIPE, MD2225, MD1-6BONE
Phone: +40-1-7719245


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

* Re: question
  1998-03-09 16:01     ` question Mircea Damian
@ 1998-03-09 17:30       ` Bart Schaefer
  1998-03-09 17:42         ` question Mircea Damian
  1998-03-10 11:04       ` question Stephen Marley
  1 sibling, 1 reply; 13+ messages in thread
From: Bart Schaefer @ 1998-03-09 17:30 UTC (permalink / raw)
  To: Mircea Damian, zsh-users

On Mar 9,  6:01pm, Mircea Damian wrote:
} Subject: Re: question
}
} Another issue:
}  There is a problem in zsh-3.0.5 which I can't reproduce it. Sometimes, not
} very often, it happens to exit unexpectedly from my session.

Have you by any chance applied a patch for the HIST_REDUCE_BLANKS option?
The most recently posted version of that patch -- which was quite a while
ago, admittedly -- applies (IIRC) without rejections to zsh-3.0.x, but
introduces a bug that causes the shell to exit as soon as the length of
the history exactly equals HISTSIZE.  

However, I doubt that's the problem ... the only place in the code that
I can find that would print the string "logout" on the same line as the
prompt, like you showed here:

} dmircea@mail:/home/dmircea% logout

Is this bit of init.c:

	if (!(isset(IGNOREEOF) && interact)) {
#if 0
	    if (interact)
		fputs(islogin ? "logout\n" : "exit\n", stderr);
#endif
	    zexit(lastval, 0);
	    continue;
	}

That would mean that (1) you've changed the `#if 0' to get that code to
compile and (2) zsh is seeing end-of-file on the terminal.  You might want
to try "setopt ignoreeof" and just to see what happens.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


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

* Re: question
  1998-03-09 14:35   ` question Geoff Wing
@ 1998-03-09 16:01     ` Mircea Damian
  1998-03-09 17:30       ` question Bart Schaefer
  1998-03-10 11:04       ` question Stephen Marley
  0 siblings, 2 replies; 13+ messages in thread
From: Mircea Damian @ 1998-03-09 16:01 UTC (permalink / raw)
  To: mason, zsh-users

On Mon, Mar 09, 1998 at 02:35:37PM +0000, Geoff Wing wrote:
> Andrew Main <zefram@tao.co.uk> typed:
> :Mircea Damian wrote:
> :>After that if I launch zsh again the bindings are a lot shorter. I'm used
> :>to press ^A and ^E to go to the beginning of line or at the end. These
> :>sequences are not mapped anymore.
> :This sounds like you're getting the vi keymap, which will happen if you
> :have $EDITOR set to vi when zsh starts up.
> 
> And pointing you in the right direction:  look in the manual for ``bindkey''.
> You may want to put ``bindkey -e'' at the start of your ~/.zshrc
It seems that fixed my problem.

In fact I didn't know that zsh looks in my 0 after $EDITOR
variable(which I like to set it to "vim"). Thank you!

Another issue:
 There is a problem in zsh-3.0.5 which I can't reproduce it. Sometimes, not
 very often, it happens to exit unexpectedly from my session. It seems that
it executes the commands found in .zlogout it. Last time when I saw that my
last command was: 


dmircea@mail:/home/dmircea% echo "somth";ls

The output was something like:
somth
... {ls output} ...
dmircea@mail:/home/dmircea% logout
Logout



The last string("Logout") was printed by .zlogout with an echo command.

I use zsh-3.0.5 on a Linux 2.0.33 running on a Intel P200. Any hints?

-- 
Mircea Damian
Kappa Administrator
dmircea@roedu.net, dmircea@lbi.ro, dmircea@kappa.ro
MD65-RIPE, MD2225, MD1-6BONE
Phone: +40-1-7719245


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

* Re: question
  1998-03-09 11:48 ` question Andrew Main
@ 1998-03-09 14:35   ` Geoff Wing
  1998-03-09 16:01     ` question Mircea Damian
  0 siblings, 1 reply; 13+ messages in thread
From: Geoff Wing @ 1998-03-09 14:35 UTC (permalink / raw)
  To: zsh-users

Andrew Main <zefram@tao.co.uk> typed:
:Mircea Damian wrote:
:>After that if I launch zsh again the bindings are a lot shorter. I'm used
:>to press ^A and ^E to go to the beginning of line or at the end. These
:>sequences are not mapped anymore.
:This sounds like you're getting the vi keymap, which will happen if you
:have $EDITOR set to vi when zsh starts up.

And pointing you in the right direction:  look in the manual for ``bindkey''.
You may want to put ``bindkey -e'' at the start of your ~/.zshrc
-- 
Geoff Wing   <gcw@pobox.com>            Mobile : 0412 162 441 
Work URL: http://www.primenet.com.au/   Ego URL: http://pobox.com/~gcw/


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

* Re: question
  1998-03-09 11:27 question Mircea Damian
@ 1998-03-09 11:48 ` Andrew Main
  1998-03-09 14:35   ` question Geoff Wing
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Main @ 1998-03-09 11:48 UTC (permalink / raw)
  To: Mircea Damian; +Cc: zsh-users

Mircea Damian wrote:
>After that if I launch zsh again the bindings are a lot shorter. I'm used
>to press ^A and ^E to go to the beginning of line or at the end. These
>sequences are not mapped anymore.

This sounds like you're getting the vi keymap, which will happen if you
have $EDITOR set to vi when zsh starts up.

-zefram


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

* question
@ 1998-03-09 11:27 Mircea Damian
  1998-03-09 11:48 ` question Andrew Main
  0 siblings, 1 reply; 13+ messages in thread
From: Mircea Damian @ 1998-03-09 11:27 UTC (permalink / raw)
  To: zsh-users

Hello,

I have just a small question to ask:
My default shell is /usr/local/bin/zsh.

First the key bindings are:

"^@"    set-mark-command
"^A"    beginning-of-line
"^B"    backward-char
"^C"    undefined-key
"^D"    delete-char-or-list
"^E"    end-of-line
"^F"    forward-char
"^G"    send-break
"^H"    backward-delete-char
"^I"    expand-or-complete
"^J"    accept-line
"^K"    kill-line

<skip some lines>

"^[w"   copy-region-as-kill
"^[x"   execute-named-cmd
"^[y"   yank-pop
"^[z"   execute-last-named-cmd
"^[|"   vi-goto-column
"^[^?"  backward-kill-word
dmircea@mail:/home/dmircea%

After that if I launch zsh again the bindings are a lot shorter. I'm used
to press ^A and ^E to go to the beginning of line or at the end. These
sequences are not mapped anymore.

Is there any solution to resolve this except binding every key in my .zshrc
or .zprofile(or anything like that)?

PS: I noticed that since I started to use screen. Anyway there isn't any
connection between screen and zsh (see the example above when I didn't use
screen)

-- 
Mircea Damian
Kappa Administrator
dmircea@roedu.net, dmircea@lbi.ro, dmircea@kappa.ro
MD65-RIPE, MD2225, MD1-6BONE
Phone: +40-1-7719245


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

end of thread, other threads:[~2018-03-02 12:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20180302035019epcas2p31b866a89661bbedcf2af60dbb038e091@epcas2p3.samsung.com>
2018-03-02  3:48 ` question Quolick
2018-03-02  4:34   ` question lilydjwg
2018-03-02 12:00     ` question Vincent Bernat
2018-03-02  4:38   ` question Ray Andrews
2018-03-02  9:05   ` question Peter Stephenson
1998-03-09 18:46 question Niall Smart
  -- strict thread matches above, loose matches on Subject: below --
1998-03-09 11:27 question Mircea Damian
1998-03-09 11:48 ` question Andrew Main
1998-03-09 14:35   ` question Geoff Wing
1998-03-09 16:01     ` question Mircea Damian
1998-03-09 17:30       ` question Bart Schaefer
1998-03-09 17:42         ` question Mircea Damian
1998-03-10 11:04       ` question Stephen Marley

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