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