Dont bother with new escape code for setting title
Since we are only sending the last command, it cannot have CSI sequences in it anyway except in extremely contrived situations, so just strip all ctrl chars out.
This commit is contained in:
@@ -139,8 +139,7 @@ _ksi_main() {
|
||||
last_cmd=$(HISTTIMEFORMAT= builtin history 1)
|
||||
last_cmd="${last_cmd#*[[:digit:]]*[[:space:]]}" # remove leading history number
|
||||
last_cmd="${last_cmd#"${last_cmd%%[![:space:]]*}"}" # remove remaining leading whitespace
|
||||
last_cmd=$(builtin printf "%s" "$last_cmd" | base64)
|
||||
builtin printf "\e]22222;%s\a" "${last_cmd//[[:space:]]}"
|
||||
builtin printf "\e]2;%s\a" "${last_cmd//[[:cntrl:]]}" # remove any control characters
|
||||
}
|
||||
_ksi_prompt[ps0_suffix]+='$(_ksi_get_current_command)'
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user