From: Oleg Broytman Date: Sat, 30 Sep 2023 11:47:25 +0000 (+0300) Subject: .bashrc: Save history and open a new `screen` window X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=280df729e61f6bd482af136ddddad025cd6cebdb;p=dotfiles.git .bashrc: Save history and open a new `screen` window --- diff --git a/.bashrc b/.bashrc index a9ac99d..bbbc13c 100644 --- a/.bashrc +++ b/.bashrc @@ -340,3 +340,10 @@ 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