.bashrc.lib

Thu, 04 Aug 2016 13:51:33 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Thu, 04 Aug 2016 13:51:33 -0400
changeset 365
b3ab12e8a598
parent 270
dda2a7f4d485
permissions
-rw-r--r--

dont wait after urlscan, add htmlify macro

270
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 # vim: ft=sh
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
2
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3 path-append() {
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
4 if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
5 PATH="${PATH:+"$PATH:"}$1"
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6 return 0
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
7 fi
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8 return 1
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
9 }
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
10
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
11 path-prepend() {
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
12 if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
13 PATH="$1${PATH:+":$PATH"}"
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
14 return 0
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15 fi
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
16 return 1
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
17 }
dda2a7f4d485 nice up bashrc and xsessionrc
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
18

mercurial