Wrapper script for aerc

This commit is contained in:
Trevor Vallender 2023-05-26 11:20:47 +01:00
parent 6b501af1f9
commit 4a4d524eb4
1 changed files with 21 additions and 0 deletions

21
aerc.bash Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Best practice options
set -o errexit
set -o nounset
set -o pipefail
if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi
cd "$(dirname "$0")"
main() {
export BW_SESSION=$(
bw unlock --passwordfile ~/.bwpass |
grep "\--session " |
awk '{print $NF}'
)
aerc
}
main "$@"