News for hackers. Stuff that matters.
Re:Don't waste your time by cd-ing in the terminal by bretthopper on Friday February 18, 2011 @06:33PM (#2237746)
No mention of ZSH directory stacks yet? http://www.acm.uiuc.edu/workshops/zsh/dir_stack.html

Some helpful aliases to manage them:

alias 1='cd -1'

alias 2='cd -2'

alias 3='cd -3'

alias 4='cd -4'

alias 5='cd -5'

alias 6='cd -6'

alias 7='cd -7'

alias d='dirs -v'

alias h='history'

alias j='jobs'

Just one of the many reasons to use ZSH.

Re:Don't waste your time by cd-ing in the terminal by jrockway on Friday February 18, 2011 @07:03PM (#2237821)
Just one of the many reasons to use ZSH.

What shell doesn't have a directory stack?

Re:Don't waste your time by cd-ing in the terminal by ramen on Friday February 18, 2011 @07:08PM (#2237837)
What's the bash equivalent to zsh's "setopt autopushd"?
Re:Don't waste your time by cd-ing in the terminal by FaceKicker on Friday February 18, 2011 @07:27PM (#2237887)
I don't know what that is, but does it do more than alias cd='pushd'?
Re:Don't waste your time by cd-ing in the terminal by ramen on Saturday February 19, 2011 @12:19AM (#2238471)
That's essentially what it does, but if you use the "autocd" option as well, you don't need to type "cd" - you can just use the name of a directory as a command. So, "autopushd" would ensure that these operations use the directory stack also.
Re:Don't waste your time by cd-ing in the terminal by cicero on Saturday February 19, 2011 @04:01PM (#2239897)
sh
Re:Don't waste your time by cd-ing in the terminal by ringm on Friday February 18, 2011 @10:11PM (#2238233)
I have bound 'pushd -1' to PgUp.

    function directory_up { 
      pushd -1
      zle reset-prompt 
    }
    zle -N directory-up directory_up
    bindkey "\e[5~" directory-up
Ditto for "pushd +0" and PgDn.
Re:Don't waste your time by cd-ing in the terminal by sjs on Friday February 18, 2011 @08:16PM (#2238003)
How about `setopt cdablevars`?

    setopt cdablevars
    proj=$HOME/Projects
    cd proj
    pwd # => /Users/sjs/Projects
Re:Don't waste your time by cd-ing in the terminal by nolite on Friday February 18, 2011 @08:07PM (#2237980)
nice stuff. You got your dotfiles on a github?
Re:Don't waste your time by cd-ing in the terminal by sjs on Friday February 18, 2011 @08:17PM (#2238007)
I know you didn't ask me, but you might find something you like here: https://github.com/samsonjs/config (dot files) and https://github.com/samsonjs/bin
Re:Don't waste your time by cd-ing in the terminal by nolite on Friday February 18, 2011 @11:33PM (#2238389)
appreciated, thanks!