summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc26
1 files changed, 12 insertions, 14 deletions
diff --git a/.bashrc b/.bashrc
index 721f68d..0ed5f77 100644
--- a/.bashrc
+++ b/.bashrc
@@ -1,16 +1,17 @@
-[ -n "$ENV" ] && . "$ENV" || [ -e ~/.env ] && . ~/.env
+# .bashrc
+[ -n "$ENV" ] && . "$ENV" || ([ -e ~/.env ] && . ~/.env)
-# Prompt for Bash
-export PS1='\[\033[1;33m\]$(prompt)\[\033[0m\]'
-export HISTCONTROL=ignoredups
-export HISTIGNORE="gst:gl"
-export HISTTIMEFORMAT="%F %R:%S "
-export PROMPT_COMMAND="history -a;history -n"
+PS1='\[\033[1;33m\]$(prompt)\[\033[0m\]'
+HISTCONTROL=ignoreboth:erasedups
+HISTIGNORE="gst"
+# see man strftime
+HISTTIMEFORMAT="%F "
-# Verify before running history command
-shopt -s histverify
+# Uncomment this line and remove `histappend' to enable shared history.
+# PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r;"
+shopt -s histappend
-# See Bash man
+# See Bash manual
_completion_loader()
{
# Completion files on Arch
@@ -31,11 +32,8 @@ _direnv_hook() {
trap - SIGINT;
return $previous_exit_status;
};
+
if ! [[ "${PROMPT_COMMAND:-}" =~ _direnv_hook ]]; then
PROMPT_COMMAND="_direnv_hook${PROMPT_COMMAND:+;$PROMPT_COMMAND}"
fi
-alias gl='git pull'
-alias gcm='git checkout master'
-alias gco='git checkout'
-alias gst='git status'