`fdfind`-`fd` link not working properly
Closed this issue · 9 comments
At yesterday's Hugo 101 presentation I ran through the shell-bling-ubuntu
scripts according to the plan, and yet, at a later date, fd
did not appear to exist in my Kitty terminal. Why not? Do I have to log out, and log back in, for the $PATH to update? That seems a little weird.
Yeah, no. Just reproduced this bug at work -- I only have fdfind
, not fd
proper. Better spend some time later on fixing that up.
For sure. The lines
# Link fd to fdfind.
mkdir -p ~/.local/bin
ln -s $(which fdfind) ~/.local/bin/fd
just plain don't work on Ubuntu. Restarting the terminal after running them did nothing.
What about a reboot? ... Oh! That did work. How odd!
Now testing to see whether logging out and in again fixes the problem. If it does, I'll just rewrite the end text to account for that.
Oh, that's even weirder. Logging out and in does not fix the issue. That is really, really odd.
Ahhh. On here, there was a step I missed: " Make sure that $HOME/.local/bin is in your $PATH."
Gonna just add that real quick, now...
It was a bit of a hack! But I think I finally have it working for Bash at least. Now I have to test it for Fish.
The problem is that ~/.profile
does put ~/.local/bin
into your $PATH, but ~/.profile
only runs on login shells. We don't necessarily get another login shell the first time we start up the system! So I echo
code into our .bashrc
that puts ~/.local/bin
into our PATH but only if it isn't already there. If ~/.profile
loads for us, that code should then do nothing. Then we finally source .bashrc
one more time, and lo and behold -- fd
now works in Bash.
Let's give it one final test before we ship this off on a fresh Ubuntu VM.
overlooked the very obvious fix yet again lol: just use fish https://github.com/hiAndrewQuinn/shell-bling-ubuntu/blob/main/shell-bling.fish#L10