mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 09:45:25 +08:00
fish_toggle_commandline: minor test cleanup
This commit is contained in:
parent
df51fea897
commit
b9590d04e7
|
@ -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 '^##' '')
|
||||
|
|
Loading…
Reference in New Issue
Block a user