From 5bad95b47ef6b594a307fdd454641e99bec5947e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 29 Jul 2022 01:31:32 +1200 Subject: Massively cut down profile scripts Let's simplify all this a bit. --- sh/profile | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'sh/profile') diff --git a/sh/profile b/sh/profile index 30247e24..0926a250 100644 --- a/sh/profile +++ b/sh/profile @@ -1,15 +1,30 @@ -# Add ~/.local/bin to PATH -PATH=$HOME/.local/bin:$PATH +# Use lynx as our terminal browser +export BROWSER=lynx -# Load all supplementary scripts in ~/.profile.d +# Use ed as our line editor and vi as our visual editor +export EDITOR=ed +export VISUAL=vi + +# Set the POSIX interactive startup file to ~/.shinit +export ENV=$HOME/.shinit + +# Always use bytewise sorting +export LC_COLLATE=C + +# Use less as my pager +export PAGER=less + +# Assume I'm at home unless something overrides it +export TZ=Pacific/Auckland + +# Source all scripts in ~/.profile.d; many of them will be modifying $PATH, so +# we'll get that sorted out first for sh in "$HOME"/.profile.d/*.sh ; do [ -e "$sh" ] || continue . "$sh" done unset -v sh -# If ~/.shinit exists, set ENV to that -if [ -f "$HOME"/.shinit ] ; then - ENV=$HOME/.shinit - export ENV -fi +# Add ~/.local/bin and ~/.local/games to the very front of PATH, so that it +# overrides everything else +PATH=$HOME/.local/bin:$HOME/.local/games:$PATH -- cgit v1.2.3