~ecs/dotfiles

09cd5dd4dbf999185011480b5f33abffd702507c — Eyal Sawady 9 days ago 9ad2ffc
bin/cp-*: sort passwords
2 files changed, 4 insertions(+), 4 deletions(-)

M bin/cp-pass
M bin/cp-totp
M bin/cp-pass => bin/cp-pass +2 -2
@@ 1,7 1,7 @@
#!/bin/sh -eu

pass="$(find "$PASSWORD_STORE_DIR" -type f \
	| sed 's/.gpg$//' | sed 's:^.*'"$PASSWORD_STORE_DIR"'/::' \
	| sed '/^\./d' | menu)"
	| sed 's/.gpg$//' | sed "s:^.*$PASSWORD_STORE_DIR/::" \
	| sed '/^\./d' | sort | menu)"

wl-copy "$(pass show "$pass")"

M bin/cp-totp => bin/cp-totp +2 -2
@@ 1,7 1,7 @@
#!/bin/sh -eu

pass="$(find "$PASSWORD_STORE_DIR/totp" -type f \
	| sed 's/.gpg$//' | sed 's:^.*'"$PASSWORD_STORE_DIR/totp"'/::' \
	| sed '/^\./d' | menu)"
	| sed 's/.gpg$//' | sed "s:^.*$PASSWORD_STORE_DIR/totp/::" \
	| sed '/^\./d' | sort | menu)"

wl-copy "$(oathtool -b --totp "$(pass show "totp/$pass")")"