From 1bfed02bc2f1cb0bcca16b1ac7d7503c842b88c4 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 4 Dec 2014 10:39:46 +0100 Subject: [PATCH] Add doc for _autoenv_deauthorize --- autoenv.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoenv.zsh b/autoenv.zsh index 0cc0566..b8a8f05 100644 --- 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 -- 2.44.0