]> git.phdru.name Git - dotfiles.git/commitdiff
.shellrc: Move bash-only code to `.bashrc`
authorOleg Broytman <phd@phdru.name>
Fri, 13 Jan 2023 15:26:25 +0000 (18:26 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 13 Jan 2023 15:26:25 +0000 (18:26 +0300)
.bashrc
.shellrc

diff --git a/.bashrc b/.bashrc
index 3255cb6d6892ad96e983e1b4674267dd501c840a..f516a374c36abd98560693fb7bfb4ed4247152fb 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -53,6 +53,14 @@ back() { cd - "$@"; }
 functions() { typeset -f "$@"; }
 j() { jobs; }
 
+if [ -r "$HOME"/admin/prog/bash_prompt ]; then
+    . "$HOME"/admin/prog/bash_prompt
+    set_prompt
+    unset set_prompt
+else
+    PS1="${debian_chroot:+($debian_chroot)}\u@\h:\W \$SHLVL\\$ "
+fi
+
 if [ -z "$BASH_COMPLETION_COMPAT_DIR" ]; then
     if [ -d /usr/share/bash-completion -a -r /usr/share/bash-completion/bash_completion ]; then
         _BASH_COMPLETIONS_DIR=/usr/share/bash-completion/completions
index 944d2f631326f04f58168a1cefa5fbd13f56ae4c..e3a0ac7a01c1931230de2926692c7c45ced715fe 100644 (file)
--- a/.shellrc
+++ b/.shellrc
@@ -44,16 +44,6 @@ if test -n "$KSH_VERSION" -o -n "$FCEDIT"; then
     j() { jobs; }
 fi
 
-if test -n "$BASH_VERSION"; then
-    if [ -r "$HOME"/admin/prog/bash_prompt ]; then
-        . "$HOME"/admin/prog/bash_prompt
-        set_prompt
-        unset set_prompt
-    else
-        PS1="${debian_chroot:+($debian_chroot)}\u@\h:\W \$SHLVL\\$ "
-    fi
-fi
-
 # clear screen and history, logout
 chlo() { clear; cd; >$HISTFILE; unset HISTFILE; history -c; logout || exit; }