Skip to content

Commit

Permalink
-Fix: hack for mc-wrapper on Fedora/Centos
Browse files Browse the repository at this point in the history
  • Loading branch information
pjuhasz committed Oct 6, 2015
1 parent fc222fb commit 6853a51
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions git-prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,15 @@ set_shell_label() {
full="$plain_who_where $@"
short="$*"

# hack to replace garbled bash command under mc on some systems
if [[ "$short" == ". /usr/libexec/mc/mc-wrapper.sh" ]]; then
short="mc"
full="$plain_who_where $short"
fi

xterm_label() {
local args="$*"
printf "\033]0;%s\033\\" "${args:0:200}"
printf "\033]0;%s\007" "${args:0:200}"
}

screen_label() {
Expand All @@ -357,7 +363,7 @@ set_shell_label() {
fi

if [[ "$TMUX" ]]; then
full="$plain_who_where${_gp_tmux_session:+|${_gp_tmux_session}} $@"
full="$plain_who_where${_gp_tmux_session:+|${_gp_tmux_session}} $short"
fi

# FIXME: run this only if screen is in xterm (how to test for this?)
Expand Down

0 comments on commit 6853a51

Please sign in to comment.