5 ms·
Your .bashrc, .zshrc, .profile, etc. files are also special. All that's going on is that there is folder where you can leave functions to be included in the mai
by forgetfulness 5y ago
Your .bashrc, .zshrc, .profile, etc. files are also special. All that's going on is that there is folder where you can leave functions to be included in the main namespace, I don't see the big difference.
- laumars 5y agoThe difference as I understand it is your Fish equivalent of a $PS1 (and other Fish shell behaviours) have to be defined via that path. If I understand it correctly, it sounds a lot like git hooks but at a global scale rather than per repo. Now I’ve got nothing against git hooks nor Fish per se, I just don’t see this particular model for defining behaviour to be convenient (eg what if you want to quickly change the prompt of a session without affecting other sessions?) There might be more detail I’m missing and if that’s the case I apologise. But from what I’ve read thus far I’m not sold. It might appeal to others and good for them.
- forgetfulness 5y agoHow would you normally do it? Because you can still put redefinitions of all the standard functions into a single file and load them with `.` as you would with other shells. There's also this package, which the author admits only allows "slight" customization, to implement sessions: https://github.com/farzadghanei/fishion https://github.com/farzadghanei/fishion
- laumars 5y agoWell I’m not suggesting the following is a better alt shell, but in murex you have something that’s a little bit akin to a Windows Registry in that all of the shell settings are navigable through a builtin called ‘config’ https://murex.rocks/docs/commands/config.html https://murex.rocks/docs/commands/config.html You can set prompt functions with that; strings, ints and Booleans too. And ‘config’ comes with descriptions for each configurable thing, choices of options in many cases, and an easy way to default back to shell defaults too. So it’s dead easy to play around configuring whatever you want (you never need to leave the shell to look up an option). The shell has its own problems though but it’s an interesting alternative take for grouping shell config.
- faho 5y ago>The difference as I understand it is your Fish equivalent of a $PS1 (and other Fish shell behaviours) have to be defined via that path. They don't. You have to define the function somehow, but fish doesn't care about how that happens. It's just that if it's not defined yet it'll try to load it from the file. If you want, you can just do it all in config.fish, like you'd do it all in .bashrc for bash. >what if you want to quickly change the prompt of a session without affecting other sessions? Then you can redefine the function, just like you could switch the value of $PS1.
- laumars 5y agoOk. That sounds a lot more sane then. Thank you for the clarification.