←back to thread

768 points speckx | 2 comments | | HN request time: 0.525s | source
Show context
revicon ◴[] No.45674313[source]
I have a bunch of little scripts and aliases I've written over the years, but none are used more than these...

alias ..='cd ..'

alias ...='cd ../..'

alias ....='cd ../../..'

alias .....='cd ../../../..'

alias ......='cd ../../../../..'

alias .......='cd ../../../../../..'

replies(6): >>45674378 #>>45674420 #>>45674599 #>>45675353 #>>45676254 #>>45678784 #
1. cosmos0072 ◴[] No.45675353[source]
I need this *so* often that I programmed my shell to execute 'cd ..' every time I press KP/ i.e. '/' on the keypad, without having to hit Return.

Other single-key bindings I use often are:

KP* executes 'ls'

KP- executes 'cd -'

KP+ executes 'make -j `nproc`'

replies(1): >>45678496 #
2. sudahtigabulan ◴[] No.45678496[source]
How? Readline macros?