From 2a82c983c997dc322d704adeb4c20a8dd28fa346 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 30 May 2019 14:31:34 -0500 Subject: [PATCH 1/2] Improve bash history handling https://sanctum.geek.nz/arabesque/better-bash-history/ --- shell/bash/bashrc | 17 +++++++++++++++-- shell/bash/prompt | 2 ++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/shell/bash/bashrc b/shell/bash/bashrc index 398432f..5eb989b 100644 --- a/shell/bash/bashrc +++ b/shell/bash/bashrc @@ -58,6 +58,9 @@ source "$DOTFILES_PATH/shell/bash/prompt" # instead places them in the readline for editing shopt -s histverify +# always _append_ to bash history +shopt -s histappend + # prevents some Java GUI apps from not working or rendering properly due to # using wacky window managers export _JAVA_AWT_WM_NONREPARENTING=1 @@ -81,8 +84,18 @@ export TERMINAL="urxvtc" export BROWSER="firefox-developer-edition" -# unlimited history -export HISTSIZE="" +# "unlimited" history +export HISTFILESIZE="10000000" +export HISTSIZE="10000000" + +# ignore duplicates and commands starting with space (" ") +export HISTCONTROL=ignoreboth + +# ignore certain commands +HISTIGNORE='ls:ll:la' + +# ensure command history is comprised of single lines +shopt -s cmdhist # load a per-device config last so anything can be overridden if [ -a "$HOME/.env_bashrc" ]; then diff --git a/shell/bash/prompt b/shell/bash/prompt index af44860..6123afe 100644 --- a/shell/bash/prompt +++ b/shell/bash/prompt @@ -27,6 +27,8 @@ export -f "preprocess_pwd" prompt_command_func() { + # commit history to prevent data loss from edge cases + history -a RET=$? # set the color of the user and host based on the result of the previous # command From e9622a85c0598e5f926357e5f4250bdc7673b2f2 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 30 May 2019 16:07:56 -0500 Subject: [PATCH 2/2] Peuce isn't real --- scripts/colors/generator/schemes/donokai.yml | 2 +- scripts/colors/generator/schemes/donokaiblack.yml | 2 +- scripts/colors/generator/schemes/holodized.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/colors/generator/schemes/donokai.yml b/scripts/colors/generator/schemes/donokai.yml index 26de2ec..b88099d 100644 --- a/scripts/colors/generator/schemes/donokai.yml +++ b/scripts/colors/generator/schemes/donokai.yml @@ -3,7 +3,7 @@ author: "Daniel Flanagan(https://lytedev.io)" base00: "111111" # background, dark grey base01: "383830" # lighter grey base02: "49483e" # lighter grey -base03: "75715e" # greyish yellow (peuce) +base03: "75715e" # pale-ish yellow base04: "a59f85" # lighter peuce base05: "f8f8f2" # foreground white base06: "f5f4f1" # foreground 2 white diff --git a/scripts/colors/generator/schemes/donokaiblack.yml b/scripts/colors/generator/schemes/donokaiblack.yml index cc56bb2..8a16901 100644 --- a/scripts/colors/generator/schemes/donokaiblack.yml +++ b/scripts/colors/generator/schemes/donokaiblack.yml @@ -3,7 +3,7 @@ author: "Daniel Flanagan(https://lytedev.io)" base00: "000000" # background, dark grey base01: "383830" # lighter grey base02: "49483e" # lighter grey -base03: "75715e" # greyish yellow (peuce) +base03: "75715e" # pale-ish yellow base04: "a59f85" # lighter peuce base05: "f8f8f2" # foreground white base06: "f5f4f1" # foreground 2 white diff --git a/scripts/colors/generator/schemes/holodized.yml b/scripts/colors/generator/schemes/holodized.yml index 8d1ffa3..dc8fc1e 100644 --- a/scripts/colors/generator/schemes/holodized.yml +++ b/scripts/colors/generator/schemes/holodized.yml @@ -3,7 +3,7 @@ author: "Daniel Flanagan(https://lytedev.io)" base00: "eeeeee" # background, light cream base01: "ddd6c3" # darker cream base02: "ada693" # darker cream -base03: "8d8673" # greyish yellow (peuce) +base03: "8d8673" # pale-ish yellow base04: "554f45" # darker peuce base05: "111111" # foreground dark grey base06: "555555" # foreground 2 dark grey