mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
fish_toggle_commandline: minor test cleanup
This commit is contained in:
parent
df51fea897
commit
b9590d04e7
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue