From e55ea85217ad7ec7ae4e5a33a211e34813808b81 Mon Sep 17 00:00:00 2001 From: Zeglius <33781398+Zeglius@users.noreply.github.com> Date: Wed, 21 Aug 2024 23:52:30 +0200 Subject: [PATCH] Revert "Performance issue with fish shell (#1483)" (#1528) This reverts commit 063d8828a0b738245ce798787b2d3a2c6550dc0e. --- .../usr/share/fish/vendor_conf.d/brew.fish | 28 +++++-------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/system_files/overrides/usr/share/fish/vendor_conf.d/brew.fish b/system_files/overrides/usr/share/fish/vendor_conf.d/brew.fish index c0d51f0f..1ddb1c68 100644 --- a/system_files/overrides/usr/share/fish/vendor_conf.d/brew.fish +++ b/system_files/overrides/usr/share/fish/vendor_conf.d/brew.fish @@ -1,32 +1,18 @@ #!/usr/bin/fish #shellcheck disable=all -set -g __brew_instance_initialize 0 -set -g __brew_binary /home/linuxbrew/.linuxbrew/bin/brew - -function brew_new_instance - alias brew=$__brew_binary - if test $__brew_instance_initialize = 0 - if status --is-interactive - if [ -d /home/linuxbrew/.linuxbrew ] +if status --is-interactive + if [ -d /home/linuxbrew/.linuxbrew ] eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" if [ -w /home/linuxbrew/.linuxbrew ] - if [ ! -L (brew --prefix)/share/fish/vendor_completions.d/brew ] - brew completions link > /dev/null - end + if [ ! -L (brew --prefix)/share/fish/vendor_completions.d/brew ] + brew completions link > /dev/null + end end if test -d (brew --prefix)/share/fish/completions - set -p fish_complete_path (brew --prefix)/share/fish/completions + set -p fish_complete_path (brew --prefix)/share/fish/completions end if test -d (brew --prefix)/share/fish/vendor_completions.d - set -p fish_complete_path (brew --prefix)/share/fish/vendor_completions.d + set -p fish_complete_path (brew --prefix)/share/fish/vendor_completions.d end - end end - set __brew_instance_initialize 1 - brew $argv - end end - -alias brew=brew_new_instance - -