Closed stevalkr closed 4 hours ago
On Thu, Oct 31, 2024 at 04:40:10AM -0700, Steve Walker wrote:
I have a simple completion for custom command
ws
under~/.config/fish/completions
like:complete --command ws -f -a icloud --description "iCloud" --condition "__fish_use_subcommand" complete --command ws -f -a config --description "~/.config" --condition "__fish_use_subcommand"
In normal fish shell, I can have completions pressing
tab
. But in tmux, this completion is ignored, only showing files under current directory. This also happens for other commands having complete files under~/.config/fish/completions
, likenix
,fisher
.
are the outputs of printf %s\n $__fish_config_dir $fish_complete_path
and of fish_trace=1 complete -C 'ws '
different outside and inside tmux?
They are different. Original path was inherited as one variable separated by space.
Outside tmux:
~> printf %s\n $fish_complete_path
/Users/walker/.config/fish/completions
/opt/homebrew/etc/fish/completions
/Users/walker/.local/share/fish/vendor_completions.d
/Applications/kitty.app/Contents/Resources/kitty/shell-integration/fish/vendor_completions.d
/opt/homebrew/share/fish/vendor_completions.d
/opt/homebrew/Cellar/fish/3.7.1/share/fish/completions
/Users/walker/.local/share/fish/generated_completions
/Users/walker/.nix-profile/share/fish/vendor_completions.d
Inside tmux:
~> printf %s\n $fish_complete_path
/Users/walker/.config/fish/completions /opt/homebrew/etc/fish/completions /Users/walker/.local/share/fish/vendor_completions.d /Applications/kitty.app/Contents/Resources/kitty/shell-integration/fish/vendor_completions.d /opt/homebrew/share/fish/vendor_completions.d /opt/homebrew/Cellar/fish/3.7.1/share/fish/completions /Users/walker/.local/share/fish/generated_completions /Users/walker/.nix-profile/share/fish/vendor_completions.d
/opt/homebrew/Cellar/fish/3.7.1/share/fish/completions
/Users/walker/.nix-profile/share/fish/vendor_completions.d
On Thu, Oct 31, 2024 at 05:18:11AM -0700, Steve Walker wrote:
They are different. Original path was inherited as one variable separated by space.
confirm by running set -S fish_complete_path
(it says whether it was inherited).
If yes, you are exporting fish_complete_path
which is wrong. Fish should figure out the path; at most you should add entries to it.
Also try bisecting you tmux config.
Thank you so much! Removing -x
in
set -x fish_complete_path $fish_complete_path $HOME/.nix-profile/share/fish/vendor_completions.d
in my config solves the problem!
fish version
: fish, version 3.7.1system
: Darwin Kernel Version 24.1.0: Thu Oct 10 21:05:23 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6031 arm64$TERM
: xterm-kitty$XDG_CONFIG_HOME
: none$XDG_DATA_DIRS
: /nix/var/nix/profiles/default/share (set by nix)I have a simple completion for custom command
ws
under~/.config/fish/completions
like:In normal fish shell, I can have completions pressing
tab
. But in tmux, this completion is ignored, only showing files under current directory. This also happens for other commands having complete files under~/.config/fish/completions
, likenix
,fisher
.