projects
/
zsh-autoenv.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5655e26
)
Add doc for _autoenv_deauthorize
author
Daniel Hahler <git@thequod.de>
Thu, 4 Dec 2014 09:39:46 +0000 (10:39 +0100)
committer
Daniel Hahler <git@thequod.de>
Thu, 4 Dec 2014 09:39:46 +0000 (10:39 +0100)
autoenv.zsh
patch
|
blob
|
history
diff --git
a/autoenv.zsh
b/autoenv.zsh
index 0cc056684187d932f39ddd42729fe2ce13d647f4..b8a8f056170dcbf99d0b5581245fb8cface1e031 100644
(file)
--- a/
autoenv.zsh
+++ b/
autoenv.zsh
@@
-152,6
+152,9
@@
_autoenv_authorize() {
_autoenv_hash_pair $env_file >> $AUTOENV_ENV_FILENAME
}
+# Deauthorize a given filename, by removing it from the auth file.
+# This uses `test -s` to only handle non-empty files, and a subshell to
+# allow for writing to the same file again.
_autoenv_deauthorize() {
local env_file=${1:A}
if [[ -s $AUTOENV_ENV_FILENAME ]]; then