From 792ccead724f3ac7ea20c23db729acfe2a3855ab Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 30 Nov 2019 11:09:14 +0000 Subject: [PATCH] pash: simpler xclip command --- README.md | 8 ++++---- pash | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 28593b9..c8b3e91 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Using a key pair: export PASH_KEYID=XXXXXXXX Password length: export PASH_LENGTH=50 Password pattern: export PASH_PATTERN=_A-Z-a-z-0-9 Store location: export PASH_DIR=~/.local/share/pash -Clipboard tool: export PASH_CLIP='xclip -selection clipboard' +Clipboard tool: export PASH_CLIP='xclip -sel c' Clipboard timeout: export PASH_TIMEOUT=10 ``` @@ -131,11 +131,11 @@ PASH_DIR=/mnt/drive/pash pash list Set the environment variable `PASH_CLIP` to a command. ```sh -# Default: 'xclip -selection clipboard'. -export PASH_CLIP='xclip -selection clipboard' +# Default: 'xclip -sel c'. +export PASH_CLIP='xclip -sel c' # This can also be used as a one-off. -PASH_CLIP='xclip -selection clipboard' pash copy github +PASH_CLIP='xclip -sel c' pash copy github ``` ### How do I change the clipboard timeout? diff --git a/pash b/pash index b4c11eb..c14fb42 100755 --- a/pash +++ b/pash @@ -58,7 +58,7 @@ pw_copy() { # Disable warning against word-splitting as it is safe # and intentional (globbing is disabled). # shellcheck disable=2086 - : "${PASH_CLIP:=xclip -selection clipboard}" + : "${PASH_CLIP:=xclip -sel c}" printf 'Clearing clipboard in "%s" seconds.\n' \ "${PASH_TIMEOUT:=10}" @@ -138,7 +138,7 @@ Using a key pair: export PASH_KEYID=XXXXXXXX Password length: export PASH_LENGTH=50 Password pattern: export PASH_PATTERN=_A-Z-a-z-0-9 Store location: export PASH_DIR=~/.local/share/pash -Clipboard tool: export PASH_CLIP='xclip -selection clipboard' +Clipboard tool: export PASH_CLIP='xclip -sel c' Clipboard timeout: export PASH_TIMEOUT=10 " exit 1