summaryrefslogtreecommitdiff
path: root/xboomx/bin/xboomx_path.py
diff options
context:
space:
mode:
Diffstat (limited to 'xboomx/bin/xboomx_path.py')
-rwxr-xr-xxboomx/bin/xboomx_path.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/xboomx/bin/xboomx_path.py b/xboomx/bin/xboomx_path.py
index 67a1cb1..56779b3 100755
--- a/xboomx/bin/xboomx_path.py
+++ b/xboomx/bin/xboomx_path.py
@@ -1,11 +1,23 @@
#!/usr/bin/python
import os
+from xboomx.config import config
-pathes = os.environ['PATH'].split(':')
+def main():
+ pathes = os.environ['PATH'].split(':')
+ items = []
-for path in pathes:
- if os.path.isdir(path):
- for f in os.listdir(path):
- print f
+ for path in pathes:
+ if os.path.isdir(path):
+ for f in os.listdir(path):
+ items.append(f)
+
+ uniqeitems = list(set(items))
+
+ ignorelist = config.get("ignorelist","");
+ for item in uniqeitems:
+ if item not in ignorelist:
+ print item
+
+main() \ No newline at end of file