mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 17:31:14 -03:00
fish_config: Remove superfluous grep
`grep -Fx` will match fixed strings over the entire line. `status list-files foo` will match anything that starts with "foo". Since we always pass a suffix here, that's the same thing. If we really cared, we could do `string match "*.$suffix"` or similar. Fixes #12060
This commit is contained in:
@@ -376,7 +376,7 @@ function __fish_config_matching
|
||||
if not set -q argv[1]
|
||||
set -a paths (status list-files $prefix)
|
||||
else
|
||||
set -a paths (status list-files $prefix | grep -Fx -e"$prefix/"$argv$suffix)
|
||||
set -a paths (status list-files "$prefix/"$argv$suffix)
|
||||
end
|
||||
end
|
||||
string join \n $paths
|
||||
|
||||
Reference in New Issue
Block a user