fix: j array splitting

This commit is contained in:
AngeD 2023-11-12 14:02:20 +01:00
parent 2c269d03a8
commit fc8f802133

View File

@ -26,7 +26,7 @@ alias watch='coloralias watch -c -- '
alias xargs='xargs ' alias xargs='xargs '
function j() { function j() {
local dests=($(find . -mount -maxdepth 5 -type d -path "*/$1" 2> /dev/null)) local dests=("${(@f)$(find . -name "$1*" -mount -type d 2> /dev/null)}")
local dest="${dests:-$1}" local dest="${dests:-$1}"
[ -n "${dests[2]}" ] && dest="$(printf '%s\n' "${dests[@]}" | fzf)" [ -n "${dests[2]}" ] && dest="$(printf '%s\n' "${dests[@]}" | fzf)"