mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-10 01:21:16 -03:00
Autoload: Call the parser directly instead of going via "subshell"
This used to call exec_subshell, which has two issues: 1. It creates a command substitution block which shows up in a stack trace 2. It does much more work than necessary This removes a useless "in command substitution" from an error message in an autoloaded file, and it speeds up autoloading a bit (not measurable in actual benchmarks, but microbenchmarks are 2x).
This commit is contained in:
committed by
Fabian Boehm
parent
b83d8dc8c0
commit
cc689290cd
@@ -32,3 +32,15 @@ $fish -c 'echo "unfinished "$(subshell' 2>| string replace -r '.*' '<$0>'
|
||||
# CHECK: <fish: Unexpected end of string, expecting ')'>
|
||||
# CHECK: <echo "unfinished "$(subshell>
|
||||
# CHECK: < ^>
|
||||
|
||||
echo "function error" >$TMPDIR/error.fish
|
||||
$fish -c "set -g fish_function_path $(string escape $TMPDIR); error"
|
||||
# CHECKERR: ~/temp/error.fish (line 1): Missing end to balance this function definition
|
||||
# CHECKERR: function error
|
||||
# CHECKERR: ^
|
||||
# CHECKERR: from sourcing file ~/temp/error.fish
|
||||
# CHECKERR: source: Error while reading file '{{.*}}/error.fish'
|
||||
# CHECKERR: fish: Unknown command: error
|
||||
# CHECKERR: fish:
|
||||
# CHECKERR: set -g fish_function_path {{.*}}; error
|
||||
# CHECKERR: ^
|
||||
|
||||
Reference in New Issue
Block a user