mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 21:21:15 -03:00
Try to use the fish_indent that corresponds to the fish binary
Users may install two versions of fish and configure their terminal to run the one that is second in $PATH. This is not really what I'd do but it seems reasonable. We should not need $PATH for this. Fixes #10770
This commit is contained in:
@@ -18,7 +18,7 @@ function edit_command_buffer --description 'Edit the command buffer in an extern
|
||||
set -l editor (__fish_anyeditor)
|
||||
or return 1
|
||||
|
||||
set -l indented_lines (commandline -b | fish_indent --only-indent)
|
||||
set -l indented_lines (commandline -b | __fish_indent --only-indent)
|
||||
string join -- \n $indented_lines >$f
|
||||
set -l offset (commandline --cursor)
|
||||
# compute cursor line/column
|
||||
@@ -91,7 +91,7 @@ function edit_command_buffer --description 'Edit the command buffer in an extern
|
||||
$editor
|
||||
|
||||
set -l raw_lines (command cat $f)
|
||||
set -l unindented_lines (string join -- \n $raw_lines | fish_indent --only-unindent)
|
||||
set -l unindented_lines (string join -- \n $raw_lines | __fish_indent --only-unindent)
|
||||
|
||||
# Here we're checking the exit status of the editor.
|
||||
if test $status -eq 0 -a -s $f
|
||||
|
||||
Reference in New Issue
Block a user