aboutsummaryrefslogtreecommitdiff
path: root/home/john
diff options
context:
space:
mode:
authorJohn Ankarstrom <john@ankarstrom.se>2021-07-02 15:16:40 +0200
committerJohn Ankarstrom <john@ankarstrom.se>2021-07-02 15:16:40 +0200
commit6653bd38f152db1f453620e6ddea579f43e13a63 (patch)
treeefbf67219919422cb0ea208b8765a4df6937b922 /home/john
parent0867d42a414952839de725a5a07804893727dc90 (diff)
downloadlbsd-6653bd38f152db1f453620e6ddea579f43e13a63.tar.gz
.profile, .shrc: Don't set special PATH unless interactive
Diffstat (limited to 'home/john')
-rw-r--r--home/john/.profile9
-rw-r--r--home/john/.shrc15
2 files changed, 15 insertions, 9 deletions
diff --git a/home/john/.profile b/home/john/.profile
index f7db422..dea5bb8 100644
--- a/home/john/.profile
+++ b/home/john/.profile
@@ -31,6 +31,15 @@ export PAGER=less
# Set your default printer, if desired.
#export PRINTER=change-this-to-a-printer
+# Set the search path for programs.
+PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R7/bin:/usr/pkg/bin
+PATH=${PATH}:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin
+export PATH
+
+# Set the search path for man.
+MANPATH=/usr/local/man:/usr/pkg/man:/usr/X11R7/man:/usr/share/man
+export MANPATH
+
# Configure the shell to load .shrc at startup time.
# This will happen for every shell started, not just login shells.
export ENV=$HOME/.shrc
diff --git a/home/john/.shrc b/home/john/.shrc
index 6663623..b230756 100644
--- a/home/john/.shrc
+++ b/home/john/.shrc
@@ -4,15 +4,12 @@ if [ -f /etc/shrc ]; then
. /etc/shrc
fi
-SYSPATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R7/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin
-PATH=/usr/pkg/heirloom-doctools/bin:$SYSPATH
-export SYSPATH PATH
-
-SYSMANPATH=/usr/local/man:/usr/pkg/man:/usr/X11R7/man:/usr/share/man
-MANPATH=/usr/pkg/heirloom-doctools/man:$SYSMANPATH
-export SYSMANPATH MANPATH
-
case "$-" in *i*)
+ [ -z "$_PATH" ] && export _PATH=$PATH
+ [ -z "$_MANPATH" ] && export _MANPATH=$MANPATH
+ export PATH=/usr/pkg/heirloom-doctools/bin:$_PATH
+ export MANPATH=/usr/pkg/heirloom-doctools/man:$_MANPATH
+
export GIT_EDITOR='vi +:"so /usr/local/share/git.exrc"'
alias ack='ack --noheading'
@@ -40,6 +37,6 @@ case "$-" in *i*)
}
sys() {
- PATH=$SYSPATH MANPATH=$SYSMANPATH "$@"
+ PATH=$_PATH MANPATH=$_MANPATH "$@"
}
esac