diff --git a/README.md b/README.md index 833b1b4..3b961bb 100644 --- a/README.md +++ b/README.md @@ -125,26 +125,28 @@ fi ## `~/.config/fish/config.fish` ``` -if type -q theme.sh - if test -e ~/.theme_history - theme.sh (theme.sh -l|tail -n1) - end +if status is-interactive + 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. - function last_theme - theme.sh (theme.sh -l|tail -n2|head -n1) - end + # Optional + # Bind C-o to the last theme. + function last_theme + theme.sh (theme.sh -l|tail -n2|head -n1) + end - bind \co last_theme + bind \co last_theme - alias th='theme.sh -i' + alias th='theme.sh -i' - # Interactively load a light theme - alias thl='theme.sh --light -i' + # Interactively load a light theme + alias thl='theme.sh --light -i' - # Interactively load a dark theme - alias thd='theme.sh --dark -i' + # Interactively load a dark theme + alias thd='theme.sh --dark -i' + end end ```