fish_toggle_commandline: minor test cleanup

This commit is contained in:
Aaron Gyes 2022-08-02 00:30:06 -07:00
parent df51fea897
commit b9590d04e7

View File

@ -9,7 +9,7 @@
function __fish_toggle_comment_commandline --description 'Comment/uncomment the current command'
set -l cmdlines (commandline -b)
if test "$cmdlines" = ""
if test -z "$cmdlines"
set cmdlines (history search -p "#" --max=1)
end
set -l cmdlines (printf '%s\n' '#'$cmdlines | string replace -r '^##' '')