Skip to main content
added 54 characters in body
Source Link
Mikel
  • 58.7k
  • 16
  • 136
  • 155
  1. bash reads from .bash_profile andor .bashrc
  2. zsh reads from .zprofile andand .zshrc
  3. ksh reads from .profile andor $ENV
test -f ~/.shrc && source ~/.shrc

# Put any zsh-specific interactive settings here, e.g.
HISTFILE=~/.zsh_history
bindkey -e
setopt ignoreeof
# zsh sources .zshrc automatically, only need to source .profile
source ~/.profile
  1. bash reads from .bash_profile and .bashrc
  2. zsh reads from .zprofile and .zshrc
  3. ksh reads from .profile and $ENV
test -f ~/.shrc && source ~/.shrc

# Put any zsh-specific interactive settings here, e.g.
HISTFILE=~/.zsh_history
bindkey -e
setopt ignoreeof
source ~/.profile
  1. bash reads from .bash_profile or .bashrc
  2. zsh reads from .zprofile and .zshrc
  3. ksh reads from .profile or $ENV
test -f ~/.shrc && source ~/.shrc

# Put any zsh-specific interactive settings here, e.g.
HISTFILE=~/.zsh_history
setopt ignoreeof
# zsh sources .zshrc automatically, only need to source .profile
source ~/.profile
deleted 28 characters in body
Source Link
Mikel
  • 58.7k
  • 16
  • 136
  • 155
test -f ~/.shrc && source ~/.shrc

# Put any bash-specific settings here, e.g.
HISTFILE=~/.bash_history
shopt -s extglob
IGNOREEOF=yes
test -f ~/.shrc && source ~/.shrc

# Put any zsh-specific interactive settings here, e.g.
HISTFILE=~/.zsh_history
bindkey -e
setopt ignoreeof
# Interactive sub-shells source .env, unless this is bash or zsh,
# because they already sourced .env in .bashrc or .zshrc.
if test -z "$BASH_VERSION" -a -z "$ZSH_VERSION" || test -n "$BASH_VERSION" -a \( "${BASH##*/}" = "sh" \)
then
    if test -f "$HOME"/.env
    then
       && . "$HOME"/.env
    fi
fi

# The name is confusing, but $ENV is ksh's config file for interactive sessions,
# so it's equivalent to .bashrc or .zshrc.
# Putting this here makes running an interactive ksh from any login shell work.
if test -f "$HOME"/.shrc
then
   && export ENV="$HOME"/.shrc
fi

# Put any login shell specific commands here, e.g.
ssh-add
stty -ixon
source ~/.bashrc
source ~/.profile

~/.zprofilezlogin

source ~/.profile

~/.zprofile

(empty)
source ~/.shrc

# Put any bash-specific settings here, e.g.
HISTFILE=~/.bash_history
shopt -s extglob
IGNOREEOF=yes
source ~/.shrc

# Put any zsh-specific interactive settings here, e.g.
HISTFILE=~/.zsh_history
bindkey -e
setopt ignoreeof
# Interactive sub-shells source .env, unless this is bash or zsh,
# because they already sourced .env in .bashrc or .zshrc.
if test -z "$BASH_VERSION" -a -z "$ZSH_VERSION" || test -n "$BASH_VERSION" -a \( "${BASH##*/}" = "sh" \)
then
    if test -f "$HOME"/.env
    then
        . "$HOME"/.env
    fi
fi

# The name is confusing, but $ENV is ksh's config file for interactive sessions,
# so it's equivalent to .bashrc or .zshrc.
# Putting this here makes running an interactive ksh from any login shell work.
if test -f "$HOME"/.shrc
then
    export ENV="$HOME"/.shrc
fi

# Put any login shell specific commands here, e.g.
ssh-add
stty -ixon
source ~/.profile

~/.zprofile

source ~/.profile
test -f ~/.shrc && source ~/.shrc

# Put any bash-specific settings here, e.g.
HISTFILE=~/.bash_history
shopt -s extglob
IGNOREEOF=yes
test -f ~/.shrc && source ~/.shrc

# Put any zsh-specific interactive settings here, e.g.
HISTFILE=~/.zsh_history
bindkey -e
setopt ignoreeof
# Interactive sub-shells source .env, unless this is bash or zsh,
# because they already sourced .env in .bashrc or .zshrc.
if test -z "$BASH_VERSION" -a -z "$ZSH_VERSION" || test -n "$BASH_VERSION" -a \( "${BASH##*/}" = "sh" \)
then
    test -f "$HOME"/.env && . "$HOME"/.env
fi

# The name is confusing, but $ENV is ksh's config file for interactive sessions,
# so it's equivalent to .bashrc or .zshrc.
# Putting this here makes running an interactive ksh from any login shell work.
test -f "$HOME"/.shrc && export ENV="$HOME"/.shrc

# Put any login shell specific commands here, e.g.
ssh-add
stty -ixon
source ~/.bashrc
source ~/.profile

~/.zlogin

source ~/.profile

~/.zprofile

(empty)
add .zshenv, flesh things out a bit
Source Link
Mikel
  • 58.7k
  • 16
  • 136
  • 155

~/.shrcenv

# putPut allenvironment myvariables aliaseshere, ande.g.
PATH=$PATH:$HOME/bin

~/.shrc

test environment-f variables"$HOME/.env" && . "$HOME/.env"

# Put interactive shell setup here, e.g.
alias ll='ls -l'
PS1='$PWD$ '
set -o emacs
source ~/.shrc 

# and putPut any bash-specific settings here, e.g.
HISTFILE=~/.bash_history
shopt -s extglob
IGNOREEOF=yes

~/.zshenv

# Put any zsh-specific settings for non-interactive and interactive sessions, e.g.
setopt braceexpand
setopt promptsubst
setopt shwordsplit
source ~/.shrc 

# and putPut any zsh-specific interactive settings here, e.g.
HISTFILE=~/.zsh_history
bindkey -e
setopt ignoreeof
ENV=$HOME# Interactive sub-shells source .env, unless this is bash or zsh,
# because they already sourced .env in .bashrc or .zshrc.
if test -z "$BASH_VERSION" -a -z "$ZSH_VERSION" || test -n "$BASH_VERSION" -a \( "${BASH##*/}" = "sh" \)
then
    if test -f "$HOME"/.env
    then
        . "$ENV""$HOME"/.env
    fi
fi

# The name is confusing, but $ENV is ksh's config file for interactive sessions,
# so it's equivalent to .bashrc or .zshrc.
# Putting this here makes running an interactive ksh from any login shell work.
if test -f "$HOME"/.shrc
then
    export ENV="$HOME"/.shrc
fi

# Put any login shell specific commands here, e.g.
ssh-add
stty -ixon

~/.shrc

# put all my aliases and environment variables here
source ~/.shrc
# and put any bash-specific settings here
source ~/.shrc
# and put any zsh-specific settings here
ENV=$HOME/.env
. "$ENV"

~/.env

# Put environment variables here, e.g.
PATH=$PATH:$HOME/bin

~/.shrc

test -f "$HOME/.env" && . "$HOME/.env"

# Put interactive shell setup here, e.g.
alias ll='ls -l'
PS1='$PWD$ '
set -o emacs
source ~/.shrc 

# Put any bash-specific settings here, e.g.
HISTFILE=~/.bash_history
shopt -s extglob
IGNOREEOF=yes

~/.zshenv

# Put any zsh-specific settings for non-interactive and interactive sessions, e.g.
setopt braceexpand
setopt promptsubst
setopt shwordsplit
source ~/.shrc 

# Put any zsh-specific interactive settings here, e.g.
HISTFILE=~/.zsh_history
bindkey -e
setopt ignoreeof
# Interactive sub-shells source .env, unless this is bash or zsh,
# because they already sourced .env in .bashrc or .zshrc.
if test -z "$BASH_VERSION" -a -z "$ZSH_VERSION" || test -n "$BASH_VERSION" -a \( "${BASH##*/}" = "sh" \)
then
    if test -f "$HOME"/.env
    then
        . "$HOME"/.env
    fi
fi

# The name is confusing, but $ENV is ksh's config file for interactive sessions,
# so it's equivalent to .bashrc or .zshrc.
# Putting this here makes running an interactive ksh from any login shell work.
if test -f "$HOME"/.shrc
then
    export ENV="$HOME"/.shrc
fi

# Put any login shell specific commands here, e.g.
ssh-add
stty -ixon
fix .zshrc
Source Link
Mikel
  • 58.7k
  • 16
  • 136
  • 155
Loading
Source Link
Mikel
  • 58.7k
  • 16
  • 136
  • 155
Loading