1 2 3 4 5 6 7
#!/bin/sh export LC_ALL=en_US.UTF-8 case "$XTERM_SHELL" in $0) echo -n '%G'; exec "$@" ;; '') exec "$@" ;; *) echo -n '%G'; "$@"; echo -n '%@' ;; esac