about summary refs log tree commit diff stats
path: root/config/ksh/functions/pct
diff options
context:
space:
mode:
Diffstat (limited to 'config/ksh/functions/pct')
-rw-r--r--config/ksh/functions/pct8
1 files changed, 8 insertions, 0 deletions
diff --git a/config/ksh/functions/pct b/config/ksh/functions/pct
new file mode 100644
index 0000000..b80abff
--- /dev/null
+++ b/config/ksh/functions/pct
@@ -0,0 +1,8 @@
+#!/bin/ksh
+function pct {
+	if [ -z "$2" ]; then
+		pass show "$1"|tail -1|xclip -l 1 -r
+	else
+		pass show "$1"|tail -1|xclip -sel c -l 1 -r
+	fi
+}