about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--README2
-rwxr-xr-xayu13
-rw-r--r--ayu.mdoc2
3 files changed, 10 insertions, 7 deletions
diff --git a/README b/README
index 97ffcd9..00509b7 100644
--- a/README
+++ b/README
@@ -31,4 +31,4 @@ Just use the CLI tools by themselves, lol.
 License
 -------
 
-Discordian Public License
+Discordian Public License, otherwise, MIT
diff --git a/ayu b/ayu
index a4e9dcd..ffd51e1 100755
--- a/ayu
+++ b/ayu
@@ -1,14 +1,18 @@
 #!/bin/sh
 
+# ayu(1) - an actually boring password manager, which uses age(1) as backend.
+
 # Path to the program's directory
 ayu_dir="$HOME/.config/ayu"
 
+# Path to the password store
+ayu_store="$HOME/.ayu"
+
 # Path to the age(1) keys
 ayu_key="$ayu_dir/age.key"
 ayu_pub="$ayu_store/.age-id"
 
-# Path to the password store
-ayu_store="$HOME/.ayu"
+EDITOR=${EDITOR:-vi}
 
 test -d $ayu_dir || mkdir -p $ayu_dir
 test -d $ayu_store || mkdir -p $ayu_store
@@ -20,11 +24,10 @@ if ! [ -f $ayu_key ];then
 	exit 1
 fi
 
-cd $ayu_store
 
 edit() {
 	age --decrypt --identity=$ayu_key --output=${1%%.age} ${1%%.age}.age
-	vi ${1%%.age}
+	${EDITOR} ${1%%.age}
 	age --encrypt -R $ayu_pub --output=${1%%.age}.age ${1%%.age}
 	rm ${1%%.age}
 }
@@ -37,7 +40,7 @@ new() {
 	test -d "$1" && usage && exit
 
 	tmpfile="$(mktemp)"
-	vi "$tmpfile"
+	${EDITOR} "$tmpfile"
 
 	mkdir -p "$(dirname "$1")"
 	age --encrypt -R $ayu_pub -o $tmpfile.age $tmpfile
diff --git a/ayu.mdoc b/ayu.mdoc
index 6d31d8f..f94a177 100644
--- a/ayu.mdoc
+++ b/ayu.mdoc
@@ -3,7 +3,7 @@
 .Os
 .Sh NAME
 .Nm ayu
-.Nd Not-so standard unix password manager
+.Nd an actually boring password manager
 .Sh DESCRIPTION
 My own take with password managers, this one uses
 .Xr age 1