oh-my-fish / theme-bobthefish

A Powerline-style, Git-aware fish theme optimized for awesome.
MIT License
1.46k stars 225 forks source link

Hostname command not avaiable #312

Closed Henriquelay closed 2 years ago

Henriquelay commented 2 years ago

https://github.com/oh-my-fish/theme-bobthefish/blob/626bd39b002535d69e56adba5b58a1060cfb6d7b/functions/fish_title.fish#L11

hostname commands are not avaiable on all machines, and not on mine running a Arch distro. I fixed this on my machine by replacing hostname by cat /etc/hostname. Works just fine for me. Before the fix, it displays a error on every prompt. I don't know if it's a good solution for the program since it depends on cat, a GNU program, and will make the program depend on that, just like it currently depends on hostname.

bobthecow commented 2 years ago

That's not guaranteed to exist, either 😬

Screen Shot 2021-10-30 at 4 38 12 PM

uname -n is the portable POSIX way of doing it. Confirm that it works on your machine and I'll switch to that 🙂

Henriquelay commented 2 years ago

Works fine! Lets go with that :)

bobthecow commented 2 years ago

Should be fixed now!