From b30d7c1347d582adbb57bc1b69767db0ec8069cf Mon Sep 17 00:00:00 2001 From: jrd-oje <138001329+jrd-oje@users.noreply.github.com> Date: Sun, 19 Nov 2023 13:55:44 +0100 Subject: [PATCH] remove test for history file in configuration snippets theme -l outputs a valid list, even it .theme_history does not exists. Furthermore, the location of the theme_history file depends on whether XDG_CONFIG_HOME is set or not. Omitting the test would therefore make the configuration more robust against changes to the theme_history file location. --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 833b1b4..40b9ccc 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ To load the most recently selected theme automatically you can put ``` if command -v theme.sh > /dev/null; then - [ -e ~/.theme_history ] && theme.sh "$(theme.sh -l|tail -n1)" + theme.sh "$(theme.sh -l|tail -n1)" # Optional @@ -100,7 +100,7 @@ in your `~/.bashrc`. ## `~/.zshrc` ``` if command -v theme.sh > /dev/null; then - [ -e ~/.theme_history ] && theme.sh "$(theme.sh -l|tail -n1)" + theme.sh "$(theme.sh -l|tail -n1)" # Optional @@ -126,9 +126,7 @@ fi ``` if type -q theme.sh - if test -e ~/.theme_history theme.sh (theme.sh -l|tail -n1) - end # Optional # Bind C-o to the last theme.