Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions z.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2216,7 +2216,7 @@ typeset -ga chpwd_functions

local script_complete_bash = [[
if [ -n "$BASH_VERSION" ]; then
complete -o filenames -C '_zlua --complete "$COMP_LINE"' ${_ZL_CMD:-z}
complete -o filenames -o nosort -C '_zlua --complete "$COMP_LINE"' ${_ZL_CMD:-z}
fi
]]

Expand All @@ -2240,7 +2240,7 @@ _zlua_zsh_tab_completion() {
# tab completion
(( $+compstate )) && compstate[insert]=menu # no expand
local -a tmp=(${(f)"$(_zlua --complete "${words/_zlua/z}")"})
_describe "directory" tmp -U
_describe -V "directory" tmp -U
}
if [ "${+functions[compdef]}" -ne 0 ]; then
compdef _zlua_zsh_tab_completion _zlua 2> /dev/null
Expand Down Expand Up @@ -2424,7 +2424,7 @@ function _z_complete
eval "$_ZL_CMD" --complete (commandline -t)
end

complete -c $_ZL_CMD -f -a '(_z_complete)'
complete -c $_ZL_CMD -k -f -a '(_z_complete)'
complete -c $_ZL_CMD -s 'r' -d 'cd to highest ranked dir matching'
complete -c $_ZL_CMD -s 'i' -d 'cd with interactive selection'
complete -c $_ZL_CMD -s 'I' -d 'cd with interactive selection using fzf'
Expand Down