From cb447e101c2ba713185fcdffa96814c1649bc663 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 10 Nov 2023 14:59:55 +0300 Subject: [PATCH] .bashrc: minor refactoring --- .bashrc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.bashrc b/.bashrc index f3d2afb..ac5325e 100644 --- a/.bashrc +++ b/.bashrc @@ -179,8 +179,6 @@ then fi -. virtualenvwrapper_lazy.sh 2>/dev/null - if [ -n "$VIRTUAL_ENV" ] && ! type deactivate >/dev/null 2>&1; then . "$VIRTUAL_ENV/bin/activate" fi @@ -190,6 +188,16 @@ fi trap '[ "$VIRTUAL_ENV" ] && deactivate' EXIT +. virtualenvwrapper_lazy.sh 2>/dev/null + + +if test -x /usr/bin/screen >/dev/null 2>&1; then + screen_newwin() { + history -a + screen "$@" + } +fi + if [ "$SHLVL" -eq 1 -a "`type -t X`" = function ] && which startx >/dev/null 2>&1; then # From https://stackoverflow.com/a/18839557 @@ -207,10 +215,3 @@ if [ "$SHLVL" -eq 1 -a "`type -t X`" = function ] && which startx >/dev/null 2>& X() { history -a; _non_bash_X; history -r; } fi - -if test -x /usr/bin/screen >/dev/null 2>&1; then - screen_newwin() { - history -a - screen "$@" - } -fi -- 2.39.5