aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2022-02-14 20:04:35 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2022-02-14 20:04:35 -0500
commit10a13c64cc5ee3ff16caa77a7b809702cff38595 (patch)
tree2816b6e83dba605d73dbe4602e88744759e2e21a /README.md
parent68bb18b1dde2b42913c68501a9d875804b181318 (diff)
downloadcleanpath-10a13c64cc5ee3ff16caa77a7b809702cff38595.tar.gz
Implement --all/-A
* Apply filters to all environment variables
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 12 insertions, 3 deletions
diff --git a/README.md b/README.md
index 838a1bc..4591e22 100644
--- a/README.md
+++ b/README.md
@@ -18,14 +18,15 @@ $ make install
# Usage
```shell
-usage: cleanpath [-hVelrsE] [pattern ...]
+usage: cleanpath [-hVDAelrsEv] [pattern ...]
--help -h Displays this help message
--version -V Displays the program's version
- --default -D Displays default operating system PATH
+ --default -D Displays default operating system PATH
--list Format output as a list
+ --all -A Apply to all environment variables
--exact -e Filter when pattern is an exact match (default)
--loose -l Filter when any part of the pattern matches
- --regex -r Filter matches with (Extended) Regular Expressions
+ --regex -r Filter matches with (Extended) Regular Expressions
--sep [str] -s Use custom path separator (default: ':')
--env [str] -E Use custom environment variable (default: PATH)
```
@@ -74,3 +75,11 @@ a:b/e:f
PATH=$(cleanpath -r '^/opt/local/.*' '^/opt/sw/.*')
export PATH
```
+
+## Using cleanpath to filter your entire runtime environment
+
+```shell
+#!/usr/bin/env bash
+# Remove MacPorts and Fink from ALL environment variables
+eval $(cleanpath -A -r '^/opt/local/.*' '^/opt/sw/.*')
+``` \ No newline at end of file