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
This commit is contained in:
thetombla
2022-12-11 03:15:34 +01:00
committed by GitHub
parent 0cca3dd5ab
commit 60332ed8fb

View File

@@ -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"
}