Yaptıktan sonra
bind '"\eu":"cd ..\C-m"'
cd ..
tuşuna basarak yapabilirsiniz Alt-u
. Bunu chdir şampiyonasında kullandım ;-)
Tüm hızlı-chdir paketini istiyorsanız
ALT+u cd ..
ALT+n enter next dir for selection
ALT+p enter previous dir for selection
ALT+SPC choose selected dir
ALT+l list subdirectories and highlight selection
sadece bunu .bashrc'nize ekleyin
swiftcd-status() {
echo -n -e "\r\0033[1A\0033[J"
}
swiftcd-contents() {
find "$swiftcdpath" -maxdepth 1 -executable -type d
}
swiftcd-setdir ()
{
swiftcdpath=$PWD
swiftcddirnum=1
swiftcddircount=`swiftcd-contents|wc -l`;
swiftcd-status
}
swiftcd-pd ()
{
(( --swiftcddirnum <= 0 )) && swiftcddirnum=$swiftcddircount;
swiftcd-switch $swiftcddirnum
swiftcd-status
}
swiftcd-updir ()
{
cd ..;
swiftcd-setdir
}
swiftcd-list ()
{
local redOn="$(echo -e '\0033[31m\0033[1m')"
local redOff="$(echo -e '\0033[m')"
swiftcd-status
(( swiftcddircount > 1 )) && {
echo
echo $(swiftcd-contents|sed 's!^'"$swiftcdpath"'!!'|sed $swiftcddirnum' s/\(.*\)/'"$redOn"'\1'"$redOff"'/')
}
}
swiftcd-nd ()
{
(( ++swiftcddirnum > swiftcddircount )) && swiftcddirnum=1;
swiftcd-switch $swiftcddirnum
swiftcd-status
}
swiftcd-switch() {
(( $1 <= swiftcddircount && $1 > 0 )) && cd $(swiftcd-contents|sed -n $1' p')
}
bind '"\e ":"swiftcd-setdir\C-m"'
bind '"\ep":"swiftcd-pd\C-m"'
bind '"\eu":"swiftcd-updir\C-m"'
bind '"\en":"swiftcd-nd\C-m"'
bind '"\el":"swiftcd-list\C-m"'
swiftcd-setdir