From cbb0e7118b3e5685408c09873fd7d01cb8ec944e Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Thu, 8 Sep 2022 10:49:03 +0100 Subject: [PATCH] More cleanups of shell login files --- roles/home-cli/files/bash_profile | 5 +++++ roles/home-cli/files/bashrc | 5 ----- roles/home-cli/files/profile | 5 +++++ roles/home-cli/files/shrc | 12 ------------ roles/home-cli/files/zprofile | 5 +++++ roles/home-cli/files/zshrc | 5 ----- 6 files changed, 15 insertions(+), 22 deletions(-) diff --git a/roles/home-cli/files/bash_profile b/roles/home-cli/files/bash_profile index 1d71be5..3d4d8d1 100644 --- a/roles/home-cli/files/bash_profile +++ b/roles/home-cli/files/bash_profile @@ -5,3 +5,8 @@ then fi export BASH_ENV="$HOME/.bashrc" + +if [ -r "$HOME/.bashrc" ] +then + . "$HOME/.bashrc" +fi diff --git a/roles/home-cli/files/bashrc b/roles/home-cli/files/bashrc index 2fbc531..bd4375d 100644 --- a/roles/home-cli/files/bashrc +++ b/roles/home-cli/files/bashrc @@ -19,8 +19,3 @@ bind 'set bell-style none' bind 'set completion-ignore-case on' bind 'set enable-bracketed-paste off' export PS1="\[\033[01m\]\u@\h\\$\[\033[00m\] " - -if [ -r "$HOME/.shrc" ] -then - . "$HOME/.shrc" -fi diff --git a/roles/home-cli/files/profile b/roles/home-cli/files/profile index 17d120b..afa6c1e 100644 --- a/roles/home-cli/files/profile +++ b/roles/home-cli/files/profile @@ -48,3 +48,8 @@ if [ -r "$HOME/.profile.$(hostname -s)" ] then . "$HOME/.profile.$(hostname -s)" fi + +if [ -r "$HOME/.shrc" ] +then + . "$HOME/.shrc" +fi diff --git a/roles/home-cli/files/shrc b/roles/home-cli/files/shrc index 6617e49..6ffe564 100644 --- a/roles/home-cli/files/shrc +++ b/roles/home-cli/files/shrc @@ -1,10 +1,4 @@ #!/bin/sh -if [ -n "$_acp_shrc_loaded" ] -then - return 1 -fi -export _acp_shrc_loaded=1 - case "$-" in *i*) ;; @@ -201,12 +195,6 @@ then fi usermotd () { - if [ -n "$_acp_motd_shown" ] - then - return 1 - fi - export _acp_motd_shown=1 - # OS (kernel) name and version in reverse video. printf "\033[7m$(uname -sr)\033[0m\n" diff --git a/roles/home-cli/files/zprofile b/roles/home-cli/files/zprofile index 822f8fb..673911b 100644 --- a/roles/home-cli/files/zprofile +++ b/roles/home-cli/files/zprofile @@ -3,3 +3,8 @@ if [ -r "$HOME/.profile" ] then emulate sh -c '. "$HOME/.profile"' fi + +if [ -r "$HOME/.zshrc" ] +then + . "$HOME/.zshrc" +fi diff --git a/roles/home-cli/files/zshrc b/roles/home-cli/files/zshrc index dcdcf22..9e835f3 100644 --- a/roles/home-cli/files/zshrc +++ b/roles/home-cli/files/zshrc @@ -21,8 +21,3 @@ bindkey "^[OA" history-beginning-search-backward bindkey "^[OB" history-beginning-search-forward export PS1="%B%n@%m%#%b " - -if [ -r "$HOME/.shrc" ] -then - emulate sh -c '. "$HOME/.shrc"' -fi