summaryrefslogtreecommitdiff
path: root/bash/bashrc
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-11-02 19:16:54 +0100
committerAnton Khirnov <anton@khirnov.net>2020-11-02 19:16:54 +0100
commit0efa5121a2169b1833217d27a900a701803a1c1b (patch)
treeb73c10a9eb4e4d2f470ba24822d5cce75cad47fa /bash/bashrc
parentae8f4927c640fda9f7f8475bc5a91f06bac2dcfb (diff)
Add profile+bashrc
Diffstat (limited to 'bash/bashrc')
-rw-r--r--bash/bashrc32
1 files changed, 32 insertions, 0 deletions
diff --git a/bash/bashrc b/bash/bashrc
new file mode 100644
index 0000000..a4506c2
--- /dev/null
+++ b/bash/bashrc
@@ -0,0 +1,32 @@
+# If not running interactively, don't do anything
+case $- in
+ *i*) ;;
+ *) return;;
+esac
+
+# history setup
+
+## append to the history file, don't overwrite it
+shopt -s histappend
+
+## no dups+skip space-prefixed commands
+HISTCONTROL=ignoreboth
+HISTFILE=~/.local/var/bash/history
+HISTSIZE=65536
+
+# activate lesspipe
+[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
+
+# ls colors
+if [ -x /usr/bin/dircolors ]; then
+ eval "`dircolors -b`"
+ alias ls='ls --color=auto'
+fi
+
+# disable flow control
+# XXX should this be here?
+stty -ixon
+
+# define the prompt
+. ~/.config/bash/prompt
+PS1=$(__prompt_func)