X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.profile;h=07d4f98ced6178296619baaf9824deb83aebf034;hb=010b07f108be94c48aa69a7ca7547a4f8e12ea9d;hp=f9a437a411e3ab8145f5c0faac70b5240eb9cb4c;hpb=f9945e8e491d0dcdf6be25c1a4305df8ecb0e2c1;p=dotfiles.git diff --git a/.profile b/.profile index f9a437a..07d4f98 100644 --- a/.profile +++ b/.profile @@ -192,11 +192,16 @@ if [ -t 0 ] ; then ;; esac - OPS1=${OPS1}"${debian_chroot:+($debian_chroot)}\u@\h \W " + if [ -r "$HOME"/admin/prog/short_curdir ]; then + . "$HOME"/admin/prog/short_curdir + OPS1=${OPS1}"${debian_chroot:+($debian_chroot)}\u@\${HOSTNAME::5} \`short_curdir\` \\$" + else + OPS1=${OPS1}"${debian_chroot:+($debian_chroot)}\u@\h \W \\$" + fi . "$ENV" else - OPS1="${debian_chroot:+($debian_chroot)}`/usr/bin/whoami`@`/bin/hostname -s` " + OPS1="${debian_chroot:+($debian_chroot)}`/usr/bin/whoami`@`/bin/hostname -s` >" fi export OPS1 @@ -303,18 +308,3 @@ fi # # fi # fi - -# If not running interactively, don't do anything -case $- in - *i*) ;; - *) return ;; -esac - -# Stop if non-interactive shell -[ -z "$PS1" ] && return - -if [ -n "$SSH_CONNECTION" -a -z "$STY" -a -t 0 ] && - which screen >/dev/null 2>&1 -then - exec screen -xRR -S default -fi