From 29105319200ed8dbd1bcbe231b23df78d1e192cf Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Tue, 7 Apr 2020 17:29:27 +0100 Subject: allow set-screen explicit set --- bin/set-screen | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/set-screen b/bin/set-screen index 57bdd59..f2ffbfd 100755 --- a/bin/set-screen +++ b/bin/set-screen @@ -37,7 +37,11 @@ function make_display_state_dir() { function run_display_state_commands() { local dir - dir="$(display_state_dir)" + if [[ -n "$1" ]]; then + dir="${CONFIG_DIR}/$1" + else + dir="$(display_state_dir)" + fi if [[ -x "${dir}/command" ]]; then if [[ -x "${CONFIG_DIR}/pre-command" ]]; then @@ -68,7 +72,7 @@ EOF case "$1" in 'make') make_display_state_dir "$2" ;; 'which') display_state_dir ;; - '' | 'set') run_display_state_commands ;; + '' | 'set') run_display_state_commands "$2";; 'help' | '--help' ) print_usage ; exit 0 ;; *) >&2 print_usage; exit 1 ;; esac -- cgit v1.2.3