revamp compat

This commit is contained in:
2025-09-28 22:08:05 +00:00
parent 6bf779a68e
commit 3398c6b4ef
12 changed files with 83 additions and 311 deletions

View File

@@ -0,0 +1,33 @@
#!/bin/bash
if [ -z "$WSCOMPAT_DIR" ] || [ "$WS_IS_COMPAT" != 1 ]; then
exit 0
fi
[ -f /etc/profile ] && . /etc/profile
[ -f ~/.profile ] && . ~/.profile
export EDITOR=vim
export SHELL=/bin/bash
export PATH="$WSCOMPAT_DIR:$PATH"
stty intr ^K
export VIMINIT="source $WSCOMPAT_DIR/.vimrc"
cat << 'EOF_04tcIQE7' > "$WSCOMPAT_DIR/.vimrc"
{{ template "vimrc" . }}
EOF_04tcIQE7
export INPUTRC="$WSCOMPAT_DIR/.inputrc"
cat << 'EOF_04tcIQE7' > "$WSCOMPAT_DIR/.inputrc"
{{ template "inputrc" . }}
EOF_04tcIQE7
export LESSKEYIN="$WSCOMPAT_DIR/.lesskey"
cat << 'EOF_04tcIQE7' > "$WSCOMPAT_DIR/.lesskey"
{{ template "lesskey" . }}
EOF_04tcIQE7
cat << 'EOF_04tcIQE7' > "$WSCOMPAT_DIR/wssh"
{{ tmpl.Exec "wssh" . | strings.ReplaceAll "EOF_" "EOF_1_" }}
EOF_04tcIQE7