BTW, does fish have any greater relationship to zsh than it does to any
other shell?

---John

On Monday, May 20, 2013, David Adam <zanc...@ucc.gu.uwa.edu.au> wrote:
> 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
> zanc...@ucc.gu.uwa.edu.au
>
>
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to