Remove path from terminal name

This commit is contained in:
Dylan Araps 2016-10-18 08:23:03 +11:00
parent 2e88379187
commit d1b2b2828f
1 changed files with 2 additions and 2 deletions

View File

@ -1580,10 +1580,10 @@ getterm() {
case "${name// }" in case "${name// }" in
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen") getterm "$parent" ;; "${SHELL/*\/}" | *"sh" | "tmux"* | "screen") getterm "$parent" ;;
"login" | "init") term="$(tty)"; term="${term/*\/}" ;; "login" | "init") term="$(tty)" ;;
"ruby" | "1" | "systemd" | "sshd"* | "python"*) unset term ;; "ruby" | "1" | "systemd" | "sshd"* | "python"*) unset term ;;
"gnome-terminal-") term="gnome-terminal" ;; "gnome-terminal-") term="gnome-terminal" ;;
*) term="$name" ;; *) term="${name##*/}" ;;
esac esac
[ "$version" -ge 4 ] && term="${term^}" [ "$version" -ge 4 ] && term="${term^}"