summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorMehdi Sadeghi <mehdi@mehdix.org>2023-03-31 19:18:14 +0200
committerMehdi Sadeghi <mehdi@mehdix.org>2023-04-09 15:52:46 +0200
commit45a6e760ebc4438ff05f1a689518e50b4567fe93 (patch)
tree68cbff3009c29265fe10bba6fbf34ef496fde6a0 /.bashrc
parentd47e3f8702458bb73d1f656333eb49ba317cdf2f (diff)
Export GOPATH and some cleanup
Moreover, make sure KDE is not running in xinitrc before exec
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc5
1 files changed, 5 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
index c4439e7..f23a6f2 100644
--- a/.bashrc
+++ b/.bashrc
@@ -1,6 +1,11 @@
# .bashrc
echo .bashrc begin
+# Make a history backup since history is lost sometimes
+BACKUPS=~/Backups/$(date +%Y)/bash_hist/
+[[ ! -d $BACKUPS ]] && mkdir -p $BACKUPS
+cp ~/.bash_history $BACKUPS/$(date +%s)
+
# Load ENV file (shared with POSIX shell)
[ $0 != sh ] && [ -n "${ENV:=$HOME/.env}" ] && . "$ENV"