mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
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:
@@ -20,14 +20,14 @@ function _omb_plugin_xterm_short_dirname {
|
|||||||
|
|
||||||
function _omb_plugin_xterm_short_command {
|
function _omb_plugin_xterm_short_command {
|
||||||
local input_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%% *}
|
input_command=${input_command%% *}
|
||||||
fi
|
fi
|
||||||
echo "$input_command"
|
echo "$input_command"
|
||||||
}
|
}
|
||||||
|
|
||||||
function _omb_plugin_xterm_set_title {
|
function _omb_plugin_xterm_set_title {
|
||||||
local title=${1-}
|
local title=${1:-terminal}
|
||||||
printf '\e]0;%s\e\\' "$title"
|
printf '\e]0;%s\e\\' "$title"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user