mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:39:52 +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'
|
function __fish_toggle_comment_commandline --description 'Comment/uncomment the current command'
|
||||||
set -l cmdlines (commandline -b)
|
set -l cmdlines (commandline -b)
|
||||||
if test "$cmdlines" = ""
|
if test -z "$cmdlines"
|
||||||
set cmdlines (history search -p "#" --max=1)
|
set cmdlines (history search -p "#" --max=1)
|
||||||
end
|
end
|
||||||
set -l cmdlines (printf '%s\n' '#'$cmdlines | string replace -r '^##' '')
|
set -l cmdlines (printf '%s\n' '#'$cmdlines | string replace -r '^##' '')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user