From 07c0204d9a9e1cabca3b5a7140e976e5c0ee810f Mon Sep 17 00:00:00 2001 From: Shokara Kou Date: Mon, 24 Jan 2022 16:18:49 -0500 Subject: add ksh autocomplete in contrib/ I just found out recently that ksh supported autocomplete when reading the man page for got(1), so here is support for it. I have not tested whether it works on other shells like bash or zsh because I do not use them. --- README | 5 +++++ contrib/autocomplete.ksh | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 contrib/autocomplete.ksh diff --git a/README b/README index 08ddebd..8d20e2c 100644 --- a/README +++ b/README @@ -19,3 +19,8 @@ Don't. For a serious answer, it's because this doesn't depend on bash. Migrating from password-store ----------------------------- Set the ANGOU_DIR environment variable to your password store directory. + +Auto-complete +------------- +If you use ksh, all you'd have to do is source contrib/autocomplete.ksh in your +kshrc. diff --git a/contrib/autocomplete.ksh b/contrib/autocomplete.ksh new file mode 100644 index 0000000..dad6874 --- /dev/null +++ b/contrib/autocomplete.ksh @@ -0,0 +1,4 @@ +#!/bin/ksh +set -A complete_angou_1 -- help copy edit view +set -A complete_angou_2 -- $(find ${ANGOU_DIR:-~/.angou} -type f | sort \ + | sed s,${ANGOU_DIR}/,, | sed s,\\.gpg$,,) -- cgit v1.2.3