feat: j working with full path
This commit is contained in:
parent
73e2648c17
commit
3f654a51e8
@ -1 +1 @@
|
|||||||
Subproject commit e99d1590c7dc4c97b7dbc6a9c7e2dd830e204eea
|
Subproject commit c5505c70571b094663745167d40388edd40f6450
|
@ -1 +1 @@
|
|||||||
Subproject commit c9ef5e58f7d59aba875324825ff47900d0be61f2
|
Subproject commit 5a7a2ad172bcc40c53aa274dff05aacb5074b509
|
@ -29,10 +29,8 @@ alias xargs='xargs '
|
|||||||
|
|
||||||
function j() {
|
function j() {
|
||||||
local dests=($(find . -maxdepth 5 -type d -path "*/$1" 2> /dev/null))
|
local dests=($(find . -maxdepth 5 -type d -path "*/$1" 2> /dev/null))
|
||||||
#local dests=(**/"$1"/)
|
local dest="${dests:-$1}"
|
||||||
local dest="$dests"
|
|
||||||
|
|
||||||
[ -n "${dests[2]}" ] && dest="$(printf '%s\n' "${dests[@]}" | fzf)"
|
[ -n "${dests[2]}" ] && dest="$(printf '%s\n' "${dests[@]}" | fzf)"
|
||||||
ls -d "$dest"
|
|
||||||
cd "$dest"
|
cd "$dest"
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#compdef j
|
#compdef j
|
||||||
|
|
||||||
_arguments "1: :(**/"$1"/)"
|
_arguments "1: :(**/"$1")"
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit c08b925d282e35ea7bd9a8f4c29de2ece0debb49
|
Subproject commit fcbdc330ff50617c8b84d39ce069cc75df41108f
|
Loading…
Reference in New Issue
Block a user