]> git.phdru.name Git - dotfiles.git/blobdiff - .shellrc
.mc/mc.ext: Refactor opening/viewing zip files
[dotfiles.git] / .shellrc
index 7004054bbe9e184070a82a74e9a8489cb9bbcb37..d211675f3e815c927eeab2c3ddbc9aadd08d39d8 100644 (file)
--- a/.shellrc
+++ b/.shellrc
@@ -44,18 +44,16 @@ if test -n "$KSH_VERSION" -o -n "$FCEDIT"; then
    j() { jobs; }
 fi
 
-if test -n "$BASH_VERSION" -a -z "$MC_SID"; then
+if test -n "$BASH_VERSION"; then
    if [ -r "$HOME"/admin/prog/bash_prompt ]; then
       . "$HOME"/admin/prog/bash_prompt
       set_prompts
       unset set_prompts
    else
-      OPS1="${debian_chroot:+($debian_chroot)}\u@\h:\W \$SHLVL\\$ "
+      PS1="${debian_chroot:+($debian_chroot)}\u@\h:\W \$SHLVL\\$ "
    fi
 fi
 
-PS1="$OPS1"
-
 # clear screen and history, logout
 chlo() { clear; cd; >$HISTFILE; unset HISTFILE; history -c; logout || exit; }
 
@@ -75,24 +73,8 @@ include() {
 }
 
 
+[ "`type -t mc`" = alias ] && unalias mc
 mc() {
-   if test -n "$BASH_VERSION"; then
-      MC_SAVE_OPS1="$OPS1"
-      if [ "`type -t short_curdir`" = function ]; then
-         OPS1="\`cgmem_which_prompt\`\u@\${HOSTNAME::5}:\`short_curdir\`"
-         if test -x /usr/bin/git >/dev/null 2>&1; then
-            #if [ "`type -t __git_ps1`" = function ]; then
-            #   OPS1+="\$(__git_ps1)"
-            #else
-               OPS1+="\$(prompt_git)"
-            #fi
-         fi
-         OPS1+=" \$SHLVL\\$ "
-      else
-         OPS1="\u@\h:\W \$SHLVL\\$ "
-      fi
-   fi
-
    if [ -n "$SLOWTERM" ]; then
       MC_SLOW="--slow"
    fi
@@ -149,8 +131,7 @@ mc() {
       rc=1
    fi
 
-   [ -n "$MC_SAVE_OPS1" ] && OPS1="$MC_SAVE_OPS1"
-   unset MC_FOUND MC_PWD_FILE MC_SAVE_OPS1 MC_SLOW MC_TMP_DIR MC_XTERM
+   unset MC_FOUND MC_PWD_FILE MC_SLOW MC_TMP_DIR MC_XTERM
 
    return $rc
 }