You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ fish --version
fish, version 3.6.0
❯ uname -a
Linux EeroPC 5.15.83.1-microsoft-standard-WSL2 #1 SMP Wed Dec 14 23:16:32 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
The fish command __fish_complete_directories is slow compared to __fish_complete_cd on WSL2.
~/test
❯ set CDPATH ./
~/test
❯ time __fish_complete_cd
./test1/ CDPATH ./
./test2/ CDPATH ./
________________________________________________________
Executed in 858.00 micros fish external
usr time 89.00 micros 89.00 micros 0.00 micros
sys time 750.00 micros 750.00 micros 0.00 micros
~/test
❯ time __fish_complete_directories
test1/ Directory
test2/ Directory
________________________________________________________
Executed in 139.07 millis fish external
usr time 2.57 millis 2.57 millis 0.00 micros
sys time 21.88 millis 21.88 millis 0.00 micros
We really should find a solution for this hack to make __fish_complete_directories acceptably fast on WSL2. I am running into this problem because zoxide uses this command. It makes completions annoyingly slow on fish while other shells don't have any issues.
The text was updated successfully, but these errors were encountered:
Just wanted to note that hitting tab on an empty prompt (unsure what underlying function this calls) still leads to slow performance on WSL2 if the workaround eero-lehtinen proposed isn't used (thanks for that btw! Works great). Fix definitely works great for directory completion though.
I guess this is expected? (I think this searches the PATH for all commands to auto-complete, which for mount directories is super slow). Noting it either way though.
The fish command
__fish_complete_directories
is slow compared to__fish_complete_cd
on WSL2.This seems to be because fish searches the whole path for commands thanks to of this hack https://github.com/fish-shell/fish-shell/blob/904839dccee9aad844889b57c2c56a818cde9905/share/functions/__fish_complete_directories.fish#LL18. On WSL2,
$PATH
includes a lot of mounted windows paths that are slow to search, e.g./mnt/c/WINDOWS/system32
.We really should find a solution for this hack to make
__fish_complete_directories
acceptably fast on WSL2. I am running into this problem because zoxide uses this command. It makes completions annoyingly slow on fish while other shells don't have any issues.The text was updated successfully, but these errors were encountered: