You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For testing purposes it would be handy to disable loading of some configuration files. I would suggest adding -R/--no-rc switch for disabling loading files from /etc and $XDG_CONFIG_HOME and -D/--no-defaults for disabling loading from /usr/share/fish.
I've actually been running fish in this configuration - I test stuff by building via cmake, and then run it directly without installing, which leaves the prefix wrong.
b0368fd improves the situation somewhat, though there' still a bunch of stuff that I wouldn't recommend running without:
No $fish_function_path means no type or eval. Also no . or : (from share/config.fish).
Absolutely no command-not-found handler means not even an error message when a command does not exist
The fallback key bindings are unusably sparse - not even \x7f ("del") is bound, meaning my backspace doesn't work. Also no arrows.
I'm assuming not setting the locale or $PATH is alright.
We do the following things to $PATH in share/config.fish:
Add /usr/xpg4/bin on Solaris (does fish currently work on Solaris?)
$fish_user_paths
Read /etc/paths if "path_helper" exists
In addition, if $PATH is unset/empty, we set it to "/usr/bin" and "/bin" in C++. If it contains anything, we don't manipulate it.
I imagine it'd be OK to add the standard /{,usr/}{,local/}{,s}bin?
I don't think I've heard of those being missing by accident, so I don't think that'd really help. Plus hardcoding would make it quite hard to remove on purpose.
I took the same approach when it came to setting the locale - we only do that if none of the locale vars is defined, even though I strongly suggest running at least with UTF-8 encoding.
Activity
zanchey commentedon Feb 3, 2014
--no-rcis a reasonable idea, and you can fake it to a degree by running fish withXDG_CONFIG_HOMEset to/tmpor similar.--no-defaultswill result in a poorly functioning fish as much of the initialisation work is done inPREFIX/share/fish/config.fish.mqudsi commentedon May 14, 2018
I imagine
--no-defaultscould ignore config.fish, though I think it currently has some dependencies on other files in the share directory.faho commentedon May 15, 2018
Well.... maybe.
As it currently is, I wouldn't recommend it.
I've actually been running fish in this configuration - I test stuff by building via cmake, and then run it directly without installing, which leaves the prefix wrong.
b0368fd improves the situation somewhat, though there' still a bunch of stuff that I wouldn't recommend running without:
No $fish_function_path means no
typeoreval. Also no.or:(from share/config.fish).Absolutely no command-not-found handler means not even an error message when a command does not exist
The fallback key bindings are unusably sparse - not even \x7f ("del") is bound, meaning my backspace doesn't work. Also no arrows.
I'm assuming not setting the locale or $PATH is alright.
mqudsi commentedon May 15, 2018
I imagine it'd be OK to add the standard
/{,usr/}{,local/}{,s}bin? Or at least/{,usr/}bin?(I run fish directly from
./build/fishbut I also have it installed locally, so the incorrect paths end up resolving anyway.)faho commentedon May 15, 2018
Not $PATH, that's just inherited and usually okay. $fish_function_path, which is what fish uses to find its functions.
(Though yes, we would have to think about universal variables like $fish_user_paths)
faho commentedon May 16, 2018
Wow, that was quite confused of me!
Let me try that again:
We do the following things to $PATH in share/config.fish:
Add /usr/xpg4/bin on Solaris (does fish currently work on Solaris?)
$fish_user_paths
Read /etc/paths if "path_helper" exists
In addition, if $PATH is unset/empty, we set it to "/usr/bin" and "/bin" in C++. If it contains anything, we don't manipulate it.
I don't think I've heard of those being missing by accident, so I don't think that'd really help. Plus hardcoding would make it quite hard to remove on purpose.
I took the same approach when it came to setting the locale - we only do that if none of the locale vars is defined, even though I strongly suggest running at least with UTF-8 encoding.
Add some more fallback key bindings
Jomik commentedon Dec 25, 2018
mqudsi commentedon Dec 25, 2018
See #5417
rdorbala commentedon Nov 14, 2020
+1 for this.
I want to launch swaywm using a startup
~/.config/fish/conf.d/sway.fishas described in https://github.com/swaywm/sway/wiki#login-managersBut if I also want to use standalone fish scripts with shebang line
Probably I can work around this by transforming the scripts into fish functions