Repository navigation
Closed
Labels
Description
fish version: 4.1.1
OS: Darwin
Terminal:
Ghostty 1.2.1
Version
- version: 1.2.1
- channel: stable
Build Config - Zig version : 0.14.1
- build mode : builtin.OptimizeMode.ReleaseFast
- app runtime : apprt.Runtime.none
- font engine : font.main.Backend.coretext
- renderer : renderer.generic.Renderer(renderer.Metal)
- libxev : kqueue
I don't use any third party customizations
I have not been able to replicate the issue deterministically, it comes on randomly. This time it happened after i ran brew upgrade, and fish was one of the packages that was updated. I thought maybe it happened due to underlying files being changed.
But when i went through the update on my second machine which also has the same OS and terminal and same version was updated i didn't face the same issue, although i have faced the same issue on my second machine earlier.
It gets fixed when i open a new split or a new tab.
Here's the type of errors that i see when this happens.
fish: Unknown command: fish_job_summary
/opt/homebrew/Cellar/fish/4.1.1/share/fish/functions/__fish_print_pipestatus.fish (line 1): Unknown command: fish_status_to_signal
fish_status_to_signal $argv | string join "$sep"
^~~~~~~~~~~~~~~~~~~~^
in command substitution
called on line 27 of file /opt/homebrew/Cellar/fish/4.1.1/share/fish/functions/__fish_print_pipestatus.fish
in function '__fish_print_pipestatus' with arguments '\[ \] \| \e\[31m \e\[31m\e\[1m 137'
called on line 1 of file /opt/homebrew/Cellar/fish/4.1.1/share/fish/functions/fish_prompt.fish
in command substitution
called on line 31 of file /opt/homebrew/Cellar/fish/4.1.1/share/fish/functions/fish_prompt.fish
in function 'fish_prompt'
in command substitution
/opt/homebrew/Cellar/fish/4.1.1/share/fish/functions/__fish_print_pipestatus.fish (line 27): Unknown command
set -l last_pipestatus_string (fish_status_to_signal $argv | string join "$sep")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
in function '__fish_print_pipestatus' with arguments '\[ \] \| \e\[31m \e\[31m\e\[1m 137'
called on line 1 of file /opt/homebrew/Cellar/fish/4.1.1/share/fish/functions/fish_prompt.fish
in command substitution
called on line 31 of file /opt/homebrew/Cellar/fish/4.1.1/share/fish/functions/fish_prompt.fish
in function 'fish_prompt'
in command substitution
__fish_seen_subcommand_from cache
^~~~~~~~~~~~~~~~~~~~~~~~~~^
in function '__bat_cache_subcommand'
called on line 70 of file /opt/homebrew/share/fish/vendor_completions.d/bat.fish
in function '__bat_cache_no_excl'
in command substitution
/opt/homebrew/share/fish/vendor_completions.d/bat.fish (line 54): Unknown command: __fish_seen_subcommand_from
__fish_seen_subcommand_from cache
^~~~~~~~~~~~~~~~~~~~~~~~~~^
in function '__bat_cache_subcommand'
in command substitution
/opt/homebrew/share/fish/vendor_completions.d/bat.fish (line 54): Unknown command: __fish_seen_subcommand_from
__fish_seen_subcommand_from cache
^~~~~~~~~~~~~~~~~~~~~~~~~~^
in function '__bat_cache_subcommand'
in command substitution
/opt/homebrew/share/fish/vendor_completions.d/bat.fish (line 54): Unknown command: __fish_seen_subcommand_from
__fish_seen_subcommand_from cache
^~~~~~~~~~~~~~~~~~~~~~~~~~^
in function '__bat_cache_subcommand'
called on line 59 of file /opt/homebrew/share/fish/vendor_completions.d/bat.fish
in function '__bat_no_excl_args'
in command substitution
/opt/homebrew/share/fish/vendor_completions.d/bat.fish (line 59): Unknown command: __fish_seen_argument
not __bat_cache_subcommand; and not __fish_seen_argument \
^~~~~~~~~~~~~~~~~~~^
in function '__bat_no_excl_args'
in command substitution
fish: Unknown command: __fish_is_first_arg
in command substitution
fish: Unknown command: __fish_seen_argument
in command substitutionfish: Unknown command: __fish_paste
fish: Unknown command: up-or-search
fish: Unknown command: down-or-searchHere's my config.fish file
# global variables
set -gx EDITOR nano
set -gx BUN_INSTALL ~/.bun
set -gx HISTSIZE 10000
set -gx SAVEHIST 10000
set -g fish_greeting
# path mutations
fish_add_path /opt/homebrew/bin
fish_add_path /opt/homebrew/opt/openjdk/bin
fish_add_path ~/.local/bin
fish_add_path ~/tools/kafka/bin
fish_add_path $BUN_INSTALL/bin
# abbrs
# git
abbr --add cat bat
abbr --add codex codex --search
abbr --add grep rg
abbr --add gst git status
abbr --add gr git remote -v
abbr --add gra git remote add
abbr --add grrm git remote remove
abbr --add gpl git pull
abbr --add gp git push
abbr --add glg git log --oneline
abbr --add gf git fetch
abbr --add gco git checkout
abbr --add gcl git clone
abbr --add gcb git checkout -b
abbr --add gc git commit -v
abbr --add gaa git add .
abbr --add gca git commit --amend
abbr --add gcane git commit --amend --no-edit
abbr --add gsh git stash
abbr --add gshp git stash pop
abbr --add gb git branch
# fish
abbr --add reload source ~/.config/fish/config.fish
Activity
krobelus commentedon Oct 9, 2025
thetinygoat commentedon Oct 9, 2025
Can u elaborate a bit on what you mean?
Darkshadow2 commentedon Oct 9, 2025
The new version of fish may have changed function definitions or names of functions, and the old running versions of fish aren't going to magically pick those up. If the old versions try to load a function that doesn't exist in the new version, you'll get these kinds of errors.
It's best when installing a new version of fish to quit any other running instances, and immediately after the upgrade do
exec fish -l/-i(-lfor a login shell,-ifor an interactive shell, your choice on that one). Theexecline will replace the currently running version with the one just installed.krobelus commentedon Oct 10, 2025
thetinygoat commentedon Oct 10, 2025
Thanks for the response! looking forward to the fix! should i close the issue or leave it open?
krobelus commentedon Oct 13, 2025
Use standalone code paths by default
Use standalone code paths by default
Use standalone code paths by default
Use standalone code paths by default
Use standalone code paths by default
Use standalone code paths by default
Berrysoft commentedon Nov 17, 2025
@krobelus I found this issue through
git blame. I understand that why you addedembed-datafeature into the CMake build system, but it produces HUGE binaries, from ~2MB to ~12MB. It's OK if you insist, but could you consider using symlinks in CMake instead of building three executables? Then we will have one large binary instead of three (actually two large binaries and one small binary).krobelus commentedon Nov 17, 2025
Yes, replacing them with symlinks (or hardlinks?) is definitely something we should do ASAP (especially as some of these binaries include redundant translations).
I'm not sure what's the situation with symlinks on MSYS2 but we can at least do it everywhere else.
(We can also make
fish_indenta script that effectively doesexec ${0#_indent} -c 'fish_indent ...', since it's a builtin now.)I don't insist on the exact behavior we have today; the main motivation was to embed internal helper functions,
so this type of issue doesn't happen again.
There are other things such as completions and translations where we do have a graceful fallback should they change or missing or go missing, so we might not need to pack them into the binary.
There are probably other things we can do for reducing binary size, we haven't spent much time on that.
I think a substantial part of the binary size comes from translations, there has been some research into potentially compressing them.
Berrysoft commentedon Nov 17, 2025
Both symlinks and hardlinks work on MSYS2. It's better to use hardlinks, since symlinks sometimes require Administrator privilege.
krobelus commentedon Nov 17, 2025
Hardlinks seem reasonable for a start. Though "trampoline" scripts would make it more obvious that the disk space is only used once.
Hardlinks are probably not commonly used outside build systems (for caching) and maybe Git.
Now the extra bin targets only exist for
cargo install.cmake: install fish_{indent,key_reader} as hardlinks to fish
cmake: install fish_{indent,key_reader} as hardlinks to fish
krobelus commentedon Nov 19, 2025
Pushed the hardlink change.
Dumping some remaining findings.
Half of the size is embedded data files:
Their size mostly comes from completions and man pages.
We could compress them and probably save a lot.
I don't know who uses compression like that (except Linux)
Translations are currently 2MiB: