diff options
Diffstat (limited to 'bin/set-screen')
-rwxr-xr-x | bin/set-screen | 8 |
1 files changed, 6 insertions, 2 deletions
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 |