From 8409f4603efa8b1aaf60b87f9586d729a068d7ec Mon Sep 17 00:00:00 2001 From: Christian Flamm Date: Tue, 25 Jul 2017 13:04:31 +0200 Subject: [PATCH] #28: fix example-cfg, fix README, keep account/role info for prompt --- README.md | 2 +- afpre | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e9247d9..8bf2ac7 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ HOST= _PATH= NAME= # optional PW= # optional, I wouldn't put it here -PATTERN="${ACCOUNT}|${ROLE}" # optional, the message you want to see in front of the prompt +PATTERN=\${ACCOUNT}/\${ROLE} # optional, the message you want to see in front of the prompt RENEW_INT= # optional, defaults to token's expiry INSECURE= # optional, perform "insecure" SSL connections, defaults to false ``` diff --git a/afpre b/afpre index 8cd868f..fce3787 100755 --- a/afpre +++ b/afpre @@ -74,7 +74,7 @@ ACCOUNT=my.account ROLE=my.role HOST=my.afp.host _PATH=/afp-api/latest/account -#PATTERN="\${ACCOUNT}|\${ROLE}" # This will appear in front of the prompt +#PATTERN=\\\${ACCOUNT}/\\\${ROLE} # This will appear in front of the prompt #NAME=my.name #PW=my.password # I wouldn't put it here EOF @@ -128,6 +128,8 @@ $DEBUG && set -x AWS_VALID_SECONDS=0 RENEW_INT=$RENEW_INT +ACCOUNT=$ACCOUNT +ROLE=$ROLE for F in /etc/bash.bashrc /etc/bashrc ~/.bashrc ~/.profile do