Re: [Fish-users] .profile for fish?
Status: Beta
Brought to you by:
liljencrantz
|
From: David A. <za...@uc...> - 2013-05-21 01:13:49
|
On Mon, 20 May 2013, John Chludzinski wrote: > I assume that ~/.config/fish/config.fish is the equivalent of a > .profile for Bourne shell derivatives? > > I assume there is no fish analog to .bashrc files? You are in a twisty maze of initialisation files, all alike... To recap: - .profile (.zprofile in zsh) is read for login shells - .bashrc (.zshrc) is read for interactive shells - .zshenv in zsh is executed for all shells regardless (in bash there is no clear analogue) config.fish is much more like .zshenv - it is run for every shell regardless of interactivity or login status. However, you can execute commands selectively, like .profile or .bashrc, by testing for the interactive or login status: --8<---- # config.fish # for all shells set -x STARTTIME (date) if status --login # .profile or .zprofile commands keychain end if status --interactive # .bashrc or .zshrc commands stty -ixoff end --8<---- Hope that helps. David Adam za...@uc... |