Skip to content

Commit

Permalink
close issue oh-my-fish#2
Browse files Browse the repository at this point in the history
simple workaround
check if completion menu exists
if so, just select the next item
  • Loading branch information
haifengkao committed Jun 24, 2019
1 parent cb5e01e commit 9e5d7a3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion functions/expand:execute.fish
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@ function expand:execute -d 'Executes word expansion on the current token'

# If no replacements are available for the current token, defer to regular completion.
if not set -q __expand_replacements[1]
commandline -f complete
set -l ver (string split "." $FISH_VERSION)
if test (count $ver) -gt 0 -a $ver[1] -lt 3
# not fish 3, preserve fish 2 behavior
commandline -f complete
else if commandline --paging-mode
# the completion menu has been shown
commandline -f down-line
else
# show the completion menu
commandline -f complete down-line
end
return
end

Expand Down

0 comments on commit 9e5d7a3

Please sign in to comment.