|
@@ -27,6 +27,14 @@ $RIGHT_PROMPT = '{gitstatus}{env_name: {}}'
|
|
|
import re as re
|
|
|
|
|
|
# required by pinentry-tty when using gpg command:
|
|
|
-$GPG_TTY=$(tty)
|
|
|
+$GPG_TTY = $(tty)
|
|
|
+
|
|
|
+def locate(*patterns, match_all=True, ignore_case=True):
|
|
|
+ params = []
|
|
|
+ if match_all:
|
|
|
+ params.insert(0, '--all')
|
|
|
+ if ignore_case:
|
|
|
+ params.insert(0, '--ignore-case')
|
|
|
+ return $(locate @(params) -- @(patterns)).split('\n')[:-1]
|
|
|
|
|
|
# vim: filetype=python
|