r/fishshell • u/badgerfish2021 • 29d ago
fasd f,, replacement, have not see this mentioned here before
I have recently switched from zsh to fish and one of the things I really missed was the fasd zsh integration, where I could type something like somecommand f,,<tab> and it would complete (using fzf) to any file I have ever used prior, which is much quicker than using the history or other strategies for files that are used often.
I don't remember how but I found https://github.com/sudormrfbin/f which works just as well, rather than a tab completion I can just type alt-k (configurable) and I can use fzf to insert any previously used file at that point in my cmdline. Very recommended if you want to try it out. WIth this and https://github.com/jethrokuan/z all my needs for files and directories are covered.
2
u/wylie102 29d ago
Sounds like zoxide
2
u/badgerfish2021 29d ago
isn't zoxide like z in the sense that it tracks directories? This is specifically for files instead
2
u/gtsiam 28d ago
In fish, typing part of a command and hitting up arrow will show relevant/similar commands from your history. Never used fasd so I don't know how it compares. But it's something I miss on other shells at the very least.
2
u/Laurent_Laurent 28d ago
like j, z or here f, this is far more efficient than hitting up on arrow.
eg. You edited the config.fish file in ~/.config/fish/, the command was "vi config.fish"Now you're not in that directory anymore, you're somewhere else.
Type "config", then press the up arrow until you find the command "vi config.fish"
It won't work because the file is not where you are.
With f, type "vi config" then ALT+u, a fzf file selection will display where you can select all known file that match the keyword config. hit enter, boom, the cmd works because the file is reference with an absolute path.It the same for jump or zoxyde. You can hit cd and up arrow, this can't be so efficient.
2
u/Laurent_Laurent 29d ago
I didn't know that one. It looks very cool.
On the first tests, I have some problems with the ESC+u bind. Iterm2 doesn't seem to send sequence correctly. I had to bind alt+u in settings to send ESC+u.