commit d2fe3c35801eebf8e65dd402169e19261af951f1 (patch) parent 61b2b4902ddd76c6054794ffee36b510c0088341 Author: Alex Karle <alex@alexkarle.com> Date: Mon, 19 Sep 2022 13:00:45 -0400 bin: Add no9 function to strip plan9 from PATH This is helpful when I'm trying to get a command to share with coworkers (i.e. using system sed(1)). Diffstat:
A | bin/no9 | | | 10 | ++++++++++ |
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/bin/no9 b/bin/no9 @@ -0,0 +1,10 @@ +#!/bin/sh +# no9 -- opposite of 9 (strip plan9 tools from path) +# +# helpful to spawn a shell with system tools for sharing with others +# +# % no9 bash -l +# $ which rc # empty +PATH=$(echo $PATH | sed -e "s@$PLAN9/bin@@g" -e 's/::/:/' -e 's/:$//') +export PATH +exec "$@"