From 52459d675081abc13a502d08d35768338d787867 Mon Sep 17 00:00:00 2001 From: John Ankarstrom Date: Wed, 30 Jun 2021 17:57:05 +0200 Subject: utf8, iso8859-1: Set xterm encoding --- iso8859-1 | 6 +++++- utf8 | 6 +++++- 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 -- cgit v1.2.3