Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The champion is definitely this:

    alias s='cd ..'
This was enabled by default in some distro, I think it was Mandrake Linux. I learned to use it and now I can't live without it. 's' is always ready to be immediately pressed, and it can even be spammed.

    export EDITOR=vim

    function highlight() {
        egrep --color "$1|\$"
    }

    function mkcd() {
        mkdir $1
        cd $1
    }

    function git-cite() {
        git log -1 $1 "--pretty=format:%H (\"%s\")%n" | sed -e 's/\([0-f]\{12\}\)[0-f]*/\1/'
    }

    alias gd='git diff'
    alias gpr='git pull --rebase'
(and a bunch of other similar aliases)

    function gcmr() {
        git checkout origin/merge-requests/$1
    }


  alias ..='cd ..'
  alias ...='cd ../..'
  alias ....='cd ../../..'
They read more intuitively and 'cd -' works better.


He he. Nice.

Novell Netware had that built in.

cd .. did what you expect.

cd ... went up 2 levels.

cd .... up 3. And so on.


pushd and popd are very handy too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: