diff options
author | Case Duckworth | 2022-04-13 17:04:46 -0500 |
---|---|---|
committer | Case Duckworth | 2022-04-13 17:04:46 -0500 |
commit | 6f30ac188d687522f56b41ebafe7e49c322af038 (patch) | |
tree | 9e2253e0883cad1a8b12ce340a19e3b4abf9b0e9 /profile/manpath.sh | |
parent | Check for existence of dircolors (diff) | |
download | etc-6f30ac188d687522f56b41ebafe7e49c322af038.tar.gz etc-6f30ac188d687522f56b41ebafe7e49c322af038.zip |
Add path_add_unsafe and change path munging
Diffstat (limited to 'profile/manpath.sh')
-rw-r--r-- | profile/manpath.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/profile/manpath.sh b/profile/manpath.sh index def1963..944059c 100644 --- a/profile/manpath.sh +++ b/profile/manpath.sh | |||
@@ -1,9 +1,15 @@ | |||
1 | # $MANPATH shouldn't be too extra complicated (as opposed to $PATH), | 1 | # See 00_functions.sh for `path_add_unsafe'. |
2 | # so I'm not going to include a whole other function. AT SOME POINT, | 2 | |
3 | # I suppose I should generalize that function to set /any/ path-type | 3 | path_add_unsafe MANPATH \ |
4 | # variable, not just $PATH. | 4 | "${XDG_DATA_HOME:-$HOME/.local/share}/man" \ |
5 | "$HOME/.local/local/man" \ | ||
6 | "$HOME/usr/local/man" | ||
7 | |||
5 | # $MANPATH ends with `:' so that manpath(1) will prepend it to its | 8 | # $MANPATH ends with `:' so that manpath(1) will prepend it to its |
6 | # special thing. | 9 | # special thing. |
10 | case "$MANPATH" in | ||
11 | *:) ;; | ||
12 | *) MANPATH="$MANPATH:" ;; | ||
13 | esac | ||
7 | 14 | ||
8 | MANPATH="${XDG_DATA_HOME:-$HOME/.local/share}/man:" | ||
9 | export MANPATH | 15 | export MANPATH |