Blog: 2026-01-23: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 25: | Line 25: | ||
I learned a bit about CDPATH but I don't like it so whatevs |
I learned a bit about CDPATH but I don't like it so whatevs |
||
<pre> |
|||
completions $ function __fish_complete_cd |
|||
printf "%s\thoho %s\n" fofo |
|||
printf "%s\thogo %s\n" olo |
|||
end |
|||
completions $ cd ~/forks/2026_Rebuilt/ |
|||
fofo (hoho) olo (hogo) |
|||
</pre> |
|||
Latest revision as of 23:26, 23 January 2026
Thinking about this cd double directory completion
Found the current cd completion here: /opt/homebrew/Cellar/fish/4.3.3/share/fish/completions/cd.fish
This function: functions __fish_complete_cd
I guess it mostly handles this feature called CDPATH that I don't plan to use. It lets you put directories where you can cd into their subdirectories from anywhere... but then your cd tab completion is always full of maybe irrelevant options.
This post about StackOverflow's decline https://news.ycombinator.com/item?id=46482345
This new cd trick `cdh`
$ cdh g 7) ~ f 6) ~/Downloads e 5) ~/.config/fish/functions d 4) ~/.config/fish c 3) ~/forks b 2) ~/forks/2026_Rebuilt a 1) ~/hack
zoxide has a similar ui with `zi` but I don't get how to use it and don't really care to try to figure it out.
I learned a bit about CDPATH but I don't like it so whatevs
completions $ function __fish_complete_cd
printf "%s\thoho %s\n" fofo
printf "%s\thogo %s\n" olo
end
completions $ cd ~/forks/2026_Rebuilt/
fofo (hoho) olo (hogo)