pash: simpler xclip command

This commit is contained in:
Dylan Araps 2019-11-30 11:09:14 +00:00
parent 34d1e4484a
commit 792ccead72
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
2 changed files with 6 additions and 6 deletions

View File

@ -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?

4
pash
View File

@ -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