Re: Re can't the shell do a better job

From: Gregory Seidman (gsslist+debian_at_anthropohedron.net)
Date: 01/02/05

  • Next message: Toshiro: "Re: Re can't the shell do a better job"
    Date: Sun, 2 Jan 2005 10:32:44 -0500
    To: debian-user@lists.debian.org
    
    

    On Sat, Jan 01, 2005 at 10:53:48PM -0500, cga wrote:
    } Steve Lamb wrote:
    [...]
    } > Well, in the one true shell, zsh, ESC-P and ESC-N will go backwards
    } >and forwards in the history respectively. It will even take the current
    } >line as a filter so "ls" followed by multiple ESC-P will bring up my
    } >previous ls commands.
    } >
    } > I always get hung up with that in bash since ESC-P does something
    } >completely different there. Brings up a colon for some reason. To me
    } >it means, "You're not using zsh, stupid, run chsh!" :)
    } >
    } bash uses Ctrl-P and Ctrl-N.. in emacs editing mode that is..

    For the sake of the few remaining tcsh users out there (it's a great
    interactive shell, though terrible for scripting), it's also ESC-P and
    ESC-N. Of course, I essentially always want to do a history search when
    hitting up or down (the first two are for the occasional weird terminal):

    bindkey ^[[A history-search-backward
    bindkey ^[[B history-search-forward
    bindkey -k up history-search-backward
    bindkey -k down history-search-forward

    I could rant about bash and how irritating it is. For one thing, it lets
    you edit the history. Try it, it's really annoying; echo something, echo
    something else, go up two and change what the first echo was, then go down
    and echo the second thing again, then look run history and see what you
    get. If I were ever going to switch my shell away from tcsh, it would
    probably be to zsh.

    Note that I write all my shell scripts for /bin/sh, not zsh or bash or csh
    or tcsh. I even try to avoid using GNU extensions to standard tools like
    sed, tr, and grep (though sometime they are just too useful to work
    around). I've migrated from Ultrix to SunOS to FreeBSD to IRIX to Solaris
    to Linux to MacOS X over the years and my scripts keep on working; I'm
    ready for the next migration, whatever and whenever it may be (God help me,
    it might be cygwin). For an interactive shell, however, nothing beats tcsh.

    --Greg

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Toshiro: "Re: Re can't the shell do a better job"

    Relevant Pages

    • Re: stdout -determining size of??
      ... My query comes about because I had a shell running for ages with ... Could you provide the error message that made you think that stdout has ... After getting the message I dumped the history and locate.updatedb ran ... That depends entirely on the shell. ...
      (freebsd-questions)
    • Re: redirect Temporary Internet Files via GP
      ... PART "TempIE Files" EDITTEXT ... PART "History" EDITTEXT ...
      (microsoft.public.windows.group_policy)
    • Re: Real-time command history sharing between interactive shells
      ... > so they have one single shared command history. ... > I imagine some ways to do it in tcsh. ... zsh is a pretty good interactive shell, ...
      (freebsd-questions)
    • Re: Bad History when SuperUser.
      ... > with the history command. ... > how many previous sessions as root. ... > Shouldn't these things be truncated when the root shell closes down? ...
      (Fedora)
    • Re: stdout -determining size of??
      ... My query comes about because I had a shell running for ages with ... Could you provide the error message that made you think that stdout has ... After getting the message I dumped the history and locate.updatedb ran ... The shell in question is an X Konsole. ...
      (freebsd-questions)