From a57b09623ec4b53731f20af371c2bb1fdc51e457 Mon Sep 17 00:00:00 2001 From: Jacob Panek Date: Sun, 8 May 2022 02:10:29 +0200 Subject: [PATCH] prepend doas; instead of sudo; if exists --- share/functions/__fish_shared_key_bindings.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/__fish_shared_key_bindings.fish b/share/functions/__fish_shared_key_bindings.fish index e3bcbe174..9633be3de 100644 --- a/share/functions/__fish_shared_key_bindings.fish +++ b/share/functions/__fish_shared_key_bindings.fish @@ -98,7 +98,7 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod bind --preset $argv \ed 'set -l cmd (commandline); if test -z "$cmd"; echo; dirh; commandline -f repaint; else; commandline -f kill-word; end' bind --preset $argv \cd delete-or-exit - bind --preset $argv \es "fish_commandline_prepend sudo" + bind --preset $argv \es "if command -q sudo; fish_commandline_prepend sudo; else if command -q doas; fish_commandline_prepend doas; end" # Allow reading manpages by pressing F1 (many GUI applications) or Alt+h (like in zsh). bind --preset $argv -k f1 __fish_man_page