[Nix-dev] 3nd revision of multi-shell support patch
Isaac Dupree
ml at isaac.cedarswampstudios.org
Thu Feb 10 09:17:06 CET 2011
On 02/09/11 04:15, Marc Weber wrote:
> The same applies for ~/.profile (or ~/.bash_profile) and ~/.bashrc.
> So to prevent duplication the default skeleton files ~/.bash_profile
> and ~/.bashrc now source a common ~/.bash_setup file which is non
> standard - but is what I think most users want.
Most distros that I'm familiar with have the ~/.bash_profile default to
source ~/.bashrc , and then put the interesting code (like colorising
'ls') into the '.bashrc'. That might be simpler. It makes it more
difficult to have non-login-shell only code, but I am not sure what that
would be good for. (Separately from "login"ness, you can check for
"interactiveness", e.g.
case "$-" in
*i*) echo This shell is interactive ;;
*) echo This shell is not interactive ;;
esac
[cite:
http://theory.uwinnipeg.ca/localfiles/infofiles/bash/bashref_54.html ]
)
-Isaac
More information about the nix-dev
mailing list