about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAoi Koizumi <novaburst@kalli.st>2022-03-14 16:33:32 -0300
committerAoi Koizumi <novaburst@kalli.st>2022-03-14 16:33:32 -0300
commit9e095399195f5296af89322d8eb9529b9f1fc558 (patch)
tree665b76b8180be0fd5aa9f758276ef443c9c4cb4b
parent720529b3f573cfe6afcfa3fe65a4a5630148c1cd (diff)
downloadayu-9e095399195f5296af89322d8eb9529b9f1fc558.tar.gz
* Update README: per https://twt.nfld.uk/twt/xfqvrtq
* Update ayu: $clipboard -> $ayu_clipboard
* Update manual page

Signed-off-by: Aoi Koizumi <novaburst@kalli.st>
-rw-r--r--README4
-rwxr-xr-xayu4
-rw-r--r--ayu.mdoc57
3 files changed, 33 insertions, 32 deletions
diff --git a/README b/README
index 5d08259..35db5bd 100644
--- a/README
+++ b/README
@@ -1,14 +1,14 @@
 ayu (あゆ)
 ===
 
-Not-so standard unix password manager, written in (mostly) posix shell (~90 LoC)
+Not-so standard unix password manager, written in (mostly) posix shell (~90 LoC, 73 ULoC)
 Uses <https://age-encryption.org> as back-end, and tree(1) to list contents of the password store
 
 Caveats
 -------
 
 For the utility to work, you have to generate your own keypair with age-keygen(1)
-The private key should be placed as ~/.ayu/public_key and the public key should be placed as ~/.ayu/public_key
+The private key should be placed as ~/.ayu/private_key and the public key should be placed as ~/.ayu/public_key
 
 e.g. age-keygen -o ~/.ayu/private_key && age-keygen -y ~/.ayu/private_key > ~/.ayu/public_key
 
diff --git a/ayu b/ayu
index b728fdd..d12afb9 100755
--- a/ayu
+++ b/ayu
@@ -9,7 +9,7 @@ ayu_dir="${ayu_dir:-$HOME/.ayu}"
 ayu_store="${ayu_store:-$HOME/.ayu-store}"
 
 # Command to copy an entry's text into the clipboard (must accept standard input)
-clipboard="xsel -ib"
+ayu_clipboard="xsel -ib"
 
 # Path to the age(1) keys
 private_key="${private_key:-${ayu_dir}/private_key}"
@@ -30,7 +30,7 @@ cd "$ayu_store" || exit 1
 
 # Copy an entry to the clipboard
 copy() {
-	view "$2" | sed 1q | "$clipboard"
+	view "$2" | sed 1q | "$ayu_clipboard"
 }
 
 # Edit an entry if it exists
diff --git a/ayu.mdoc b/ayu.mdoc
index 03767a5..50a43a2 100644
--- a/ayu.mdoc
+++ b/ayu.mdoc
@@ -1,4 +1,4 @@
-.Dd January 30, 2022
+.Dd March 14, 2022
 .Dt ayu 1
 .Os
 .Sh NAME
@@ -23,33 +23,22 @@ but there's already a Go variant using age's library.
 .Pp
 So it's not like I'm gonna care.
 .Sh USAGE
-.Ss Add an entry
-.Nm
-.Sy -n
-.Em entry
-.Ss Copy an entry's text to the clipboard
-.Nm
-.Sy -c
-.Em entry
-.Ss Edit an entry
-.Nm
-.Sy -e
-.Em entry
-.Ss List entries
-.Nm
-.Sy -l
-.Ss Remove an entry
-.Nm
-.Sy -r
-.Em entry
-.Ss Remove recursively a directory with entries
-.Nm
-.Sy -R
-.Em entry
-.Ss View an antry
-.Nm
-.Sy -v
-.Em entry
+.Bl -tag -width 11n -compact
+.It -n
+Add a new entry
+.It -c
+Copy an entry's text to the clipboard
+.It -e
+Edit an entry
+.It -l
+List all entries
+.It -r
+Remove single entries
+.It -R
+Remove recursively a directory w/ entries
+.It -v
+View an entry
+.Bl
 .Sh CAVEATS
 You have to generate your own keypair using 
 .Xr age-keygen(1)
@@ -59,6 +48,18 @@ The private key should be placed on
 and the public key to 
 .Em ~/.ayu/public_key
 for the utility to work
+.Sh ENVIRONMENT VARIABLES
+.Ev Sy $ayu_dir
+Runtime directory
+.Pp
+.Ev Sy $ayu_store
+Password store
+.Pp
+.Ev Sy $ayu_clipboard
+Clipboard program to be used.
+Defaults to
+.Xr xclip 1
+.Pp
 .Sh SEE ALSO
 .Xr age 1
 .Xr age-keygen 1