config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit 38ce2e8413a641453552942a5c8912be263e3212
parent edb28a6b7ba3bb53e9599d7b9e91fef08671d1de
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Sat, 21 Aug 2021 22:10:08 -0700

Better solution to rcl "set twice" issue

Use a wrapper script to bypass 9term's SHELL execution (which
rightfully adds flags). Really rc is the issue but I don't want to
force people to run a patched rc.

Diffstat:
Alocal/bin/.local/bin/9term | 14++++++++++++++
Mlocal/bin/.local/bin/rcl | 3++-
2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/local/bin/.local/bin/9term b/local/bin/.local/bin/9term @@ -0,0 +1,14 @@ +#!/bin/sh +# Copyright 2021 Jacob R. Edwards +# License: GPLv3 +# 9term which doesn't pass extra flags to SHELL +# +# While this is an issue with rc, not 9term, "fixing" rc with a +# shell script would be terrible and I don't want to force myself +# (and other people I suppose) to run a patched rc. +# +# What reason there is for raising an error if the same flag is +# passed twice is beyond me, maybe it's a genius plan9 thing. + + +exec 9 9term "${@:-${SHELL:-rc}}" diff --git a/local/bin/.local/bin/rcl b/local/bin/.local/bin/rcl @@ -1,7 +1,8 @@ #!/bin/sh -a # Copyright 2021 Jacob R. Edwards # License: GPLv3 +# Interactive rc shell with input history and such history="${history:-$HOME/lib/history}" -tee -a "$history" | exec "${PLAN9:-/usr/local/plan9}/bin/rc" "$@" +tee -a "$history" | exec "${PLAN9:-/usr/local/plan9}/bin/rc" -i "$@"