feat: j dotfiles completion
This commit is contained in:
parent
fc8f802133
commit
fceb26bc0b
@ -26,7 +26,7 @@ alias watch='coloralias watch -c -- '
|
|||||||
alias xargs='xargs '
|
alias xargs='xargs '
|
||||||
|
|
||||||
function j() {
|
function j() {
|
||||||
local dests=("${(@f)$(find . -name "$1*" -mount -type d 2> /dev/null)}")
|
local dests=("${(@f)$(find . -mount -name "$1*" -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)"
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#compdef j
|
#compdef j
|
||||||
|
|
||||||
_arguments "1: :(**/"$1")"
|
_arguments "1: :($(find . -mount -name "$1*" -type d -printf "'%P' " 2> /dev/null))"
|
||||||
|
Loading…
Reference in New Issue
Block a user