Skip to content

Commit

Permalink
Fix detection of empty commandline in alt-d binding
Browse files Browse the repository at this point in the history
  • Loading branch information
krobelus committed Apr 26, 2024
1 parent 758b8e7 commit ec33550
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion share/functions/__fish_shared_key_bindings.fish
Expand Up @@ -85,7 +85,7 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod
bind --preset $argv end end-of-line
bind --preset $argv home beginning-of-line

bind --preset $argv alt-d 'if test "$(commandline)." = .; __fish_echo dirh; else; commandline -f kill-word; end'
bind --preset $argv alt-d 'if test "$(commandline; printf .)" = \n.; __fish_echo dirh; else; commandline -f kill-word; end'
bind --preset $argv ctrl-d delete-or-exit

bind --preset $argv alt-s 'for cmd in sudo doas please; if command -q $cmd; fish_commandline_prepend $cmd; break; end; end'
Expand Down

0 comments on commit ec33550

Please sign in to comment.