From 60332ed8fb954f6e6c0af243933e67d570ffc2cc Mon Sep 17 00:00:00 2001 From: thetombla Date: Sun, 11 Dec 2022 03:15:34 +0100 Subject: [PATCH] plugins/xterm: Fix xterm plugin to make it work (#378) * fixes in xterm plugin to make it work * add missing operator and default xterm title --- plugins/xterm/xterm.plugin.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/xterm/xterm.plugin.bash b/plugins/xterm/xterm.plugin.bash index 3dfde12..3496a6f 100644 --- a/plugins/xterm/xterm.plugin.bash +++ b/plugins/xterm/xterm.plugin.bash @@ -20,14 +20,14 @@ function _omb_plugin_xterm_short_dirname { function _omb_plugin_xterm_short_command { local input_command="$*" - if [[ ${OMB_PLUGIN_XTERM_SHORT_TERM_LINE-} == true ]] ((${#input_command} > 8)); then + if [[ ${OMB_PLUGIN_XTERM_SHORT_TERM_LINE-} == true ]] && ((${#input_command} > 8)); then input_command=${input_command%% *} fi echo "$input_command" } function _omb_plugin_xterm_set_title { - local title=${1-} + local title=${1:-terminal} printf '\e]0;%s\e\\' "$title" }