aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarstrom <john@ankarstrom.se>2021-06-30 17:57:05 +0200
committerJohn Ankarstrom <john@ankarstrom.se>2021-06-30 17:57:05 +0200
commit52459d675081abc13a502d08d35768338d787867 (patch)
tree0354c138c7073d851e0f658ada31f2c0f3766d6c
parente6a259ee963d9ccf993c957c0687ea8231f14bf4 (diff)
downloadxutil-52459d675081abc13a502d08d35768338d787867.tar.gz
utf8, iso8859-1: Set xterm encoding
-rwxr-xr-xiso8859-16
-rwxr-xr-xutf86
2 files changed, 10 insertions, 2 deletions
diff --git a/iso8859-1 b/iso8859-1
index da1d5a5..1af8033 100755
--- a/iso8859-1
+++ b/iso8859-1
@@ -1,3 +1,7 @@
#!/bin/sh
export LC_ALL=en_US.ISO8859-1
-exec "$@"
+case "$XTERM_SHELL" in
+$0) echo -n '%@'; exec "$@" ;;
+'') exec "$@" ;;
+*) echo -n '%@'; "$@"; echo -n '%G' ;;
+esac
diff --git a/utf8 b/utf8
index 21598b3..58460bd 100755
--- a/utf8
+++ b/utf8
@@ -1,3 +1,7 @@
#!/bin/sh
export LC_ALL=en_US.UTF-8
-exec "$@"
+case "$XTERM_SHELL" in
+$0) echo -n '%G'; exec "$@" ;;
+'') exec "$@" ;;
+*) echo -n '%G'; "$@"; echo -n '%@' ;;
+esac