diff --git a/.bash_aliases b/.bash_aliases index 7ed930a..e49e047 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -88,8 +88,13 @@ function man() { _colorman man "$@"; } # Quickly jump around places function telepeek() { - find . -type d 2>/dev/null | grep -iP "$1" | less + find . -type d 2>/dev/null | grep -iP "$1" | cat -n | sed 's/^[ 0-9]*[0-9]/\o033[34m&\o033[0m/' | less -R } function teleport() { cd $(find . -type d 2>/dev/null | grep -m1 -iP "$1"); } +function telepick() { + telepeek $1; + read -p "jump to index: " line_number; + cd $(find . -type d 2>/dev/null | grep -iP "$1" | sed "${line_number}q;d"); +}