feat: j multiple choices
This commit is contained in:
parent
cb0583efab
commit
b46fa62542
8 changed files with 16 additions and 16 deletions
|
@ -26,5 +26,14 @@ alias watch='coloralias watch -c -- '
|
|||
alias xargs='xargs '
|
||||
|
||||
function j() {
|
||||
cd **/"$1"
|
||||
local dirs=(**/"$1")
|
||||
|
||||
if [ -z "${dirs[2]}" ]; then
|
||||
cd "${dirs[1]}"
|
||||
return
|
||||
fi
|
||||
select d in "${dirs[@]}"; do
|
||||
cd "$d"
|
||||
break
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue