Skip to content

Commit

Permalink
restructuring for reusability
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Flamm committed Feb 22, 2018
1 parent d562bb9 commit 07668de
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions afpre
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,15 @@ renew() {
SECONDS=0
}
PROMPT_COMMAND="{
((\\\$SECONDS >= \\\$(token_renew_interval) )) && {
condrenew() {
((\$SECONDS >= \$(token_renew_interval) )) && {
echo token expired - need to renew...
renew
echo done.
}
}"
}
PROMPT_COMMAND=condrenew
PS1="AFP|${PATTERN} \$PS1"
Expand Down

0 comments on commit 07668de

Please sign in to comment.