added new "go" subroutine for reaching folder fast

master
Michael Ochmann 2 years ago
parent bd2d321e91
commit 085923abb9
  1. 16
      .bashrc

@ -290,6 +290,22 @@ bash_plugin() {
fi
}
go() {
DIRS=($(cat -n ~/bin/go_dirs))
select=$(dialog --menu "Go to..." 20 100 16 "${DIRS[@]}" 3>&1 1>&2 2>&3)
dialog --clear
if [ $? -ne 0 ]
then
exit 1
fi
p="${DIRS[$select * 2 - 1]}"
p="${p/#\~/$HOME}"
cd $p
}
trap bash_plugin DEBUG

Loading…
Cancel
Save