]> git.phdru.name Git - dotfiles.git/commitdiff
.bashrc: Save history and open a new `screen` window
authorOleg Broytman <phd@phdru.name>
Sat, 30 Sep 2023 11:47:25 +0000 (14:47 +0300)
committerOleg Broytman <phd@phdru.name>
Sat, 30 Sep 2023 11:47:25 +0000 (14:47 +0300)
.bashrc

diff --git a/.bashrc b/.bashrc
index a9ac99de919a16f7142387c4f53d43d5a76fcb5f..bbbc13c39336881df9568fc99c0a58f9da219b64 100644 (file)
--- 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