Allow opening script read-only with editor

Closes #12671
This commit is contained in:
cunlem
2026-04-23 20:46:59 +00:00
committed by Johannes Altmanninger
parent 170c171e85
commit 59f3719e95

View File

@@ -12,7 +12,7 @@ function __fish_edit_command_if_at_cursor --description 'If cursor is at the com
or return 1
set -l command_path (command -v -- $command)
or return 1
test -w $command_path
test -r $command_path
or return 1
string match -q 'text/*' (file --brief --mime-type -L -- $command_path)
or return 1