In any interactive shell, dash executes ~/.shinit, which contains one line: exec /usr/bin/fish.Įvery config item I need from my shell goes into ~/.profile, written in easy, conventional posix sh- and I still get to use fish as my interactive shell, without having to go through the trouble of adopting its config to my system. The first line of my ~/.profile is ENV=$HOME/.shinit export ENV. It should take you right to the correct spot to paste in these profiles. findaddpath -m -v do it (check if path already into userpath, add it if its not there) Its fishaddpath, and the -m option, short for -move, tells it to move the value if it is already included to where it would put it instead. My environment always works, I don’t have to learn fish or any other syntax. A faster way is to use the fishaddpath function, which adds given directories to the path if they aren’t already included. To get to that setting, open up your settings (cmd comma on mac or ctrl comma elsewhere), search for terminal profiles: and click edit in settings.json. This is the basic idea of what fishaddpath does - it just adds a few bells and whistles like -move. profile a number of different times for a number of different shells, I came up with a way to decouple my environment config from the shell I use. I just want a helpful shell, I don’t want to have to know yet another language, and I deeply resent fish every time it doesn’t process the line of posix sh I paste into it from a wiki…Īfter jumping between several different shells and rewriting my. Which works for me, because I have no interest in learning fish syntax. Add a prompt function file in the functions directory: ~/.config/fish/functions/fish_prompt.One of the things I like about fish is how there are sane defaults and I don’t need to have any config.Environment variables such as EDITOR or TZ can be set universally using set-Ux. stanislasmbp > nvm -version 0.33.11 stanislasmbp > nvm install node v10.6.0 is already installed. Now, you can call the nvm function that will source + execute nvm. A global variable of the same name already exists. This function will actually run nvm.sh is bass before every nvm command, thus updating our pass and allowing the use of the nvm command. Why doesn’t set-Ux (exported universal variables) seem to work¶. This is a do what I mean style command, if you need more control, consider modifying the variable yourself.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |