Closed mrt181 closed 4 months ago
Please add this to your ~/.bashrc
file and try again:
export PATH="$PATH:~/.local/bin"
Ok tried that but does not work
Did you try restarting your computer? Maybe the tmux server is missing something.
I tried
tmux kill-server & tmux
and also
wsl --shutdown
but the problem persists
I also switched to bash directly and execute the check in your code
What version of bash are you on? I suspect it's an older version of bash and the if statement is incompatible.
I recommend updating to a newer version of bash and trying again.
This is my bash version
> bash --version
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
running your script directly works
>…/tmux-nerd-font-window-name/bin > ./tmux-nerd-font-window-name fish 0
fish
>…/tmux-nerd-font-window-name/bin > ./tmux-nerd-font-window-name nvim 0
nvim
I did some additional research and I'm currently stumped. I'm guessing it has something to do with WSL and PATH resolution from inside TMUX.
I typically see Ubuntu and apt-get being used in WSL, since you're using snap perhaps there's something missing. Perhaps you can manually change the line of code that calls yq to verify that it's a path issue.
-if ! command -v yq >/dev/null 2>&1; then
+if ! command -v /home/martin/.local/bin/yq >/dev/null 2>&1; then
I understand this isn't a good permanent solution, but hopefully it can isolate the issue. Please let me know if you're able to figure out what it is and I can potentially update the README to warn people about certain environments.
ok, I did this
-if ! command -v yq >/dev/null 2>&1; then
+if ! command -v $HOME/.local/bin/yq >/dev/null 2>&1; then
This gets rid of the missing message but now the window name and icon are missing
I am using
I also tried on my linux box and there it also does not work out-of-the-box. I had to add a symbolic link to the snap yq app to make it work on linux.
The yq
intallation notes tell me to use snap
for linux/ubuntu
On my windows machine, I have installed yq by downloading it to usr/bin
.
This makes it work.
snap seems to messing it up somehow.
Glad it's working!
I have installed yq
But i still get
I also added a symlink
But that also did not help