mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 02:27:28 +08:00
Return early if token is empty in whatis_current_token
This commit is contained in:
parent
5f782cef7d
commit
ec0c3f349d
|
@ -3,7 +3,9 @@
|
||||||
function __fish_whatis_current_token -d "Show man page entries or function description related to the token under the cursor"
|
function __fish_whatis_current_token -d "Show man page entries or function description related to the token under the cursor"
|
||||||
set -l token (commandline -pt)
|
set -l token (commandline -pt)
|
||||||
|
|
||||||
if test -n "$token"
|
test -n "$token"
|
||||||
|
or return
|
||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
set -l desc "$token: nothing appropriate."
|
set -l desc "$token: nothing appropriate."
|
||||||
|
|
||||||
|
@ -37,5 +39,4 @@ function __fish_whatis_current_token -d "Show man page entries or function descr
|
||||||
end
|
end
|
||||||
|
|
||||||
commandline -f repaint
|
commandline -f repaint
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user