pash: raise default timeout to 15

This commit is contained in:
Dylan Araps 2019-11-30 11:41:28 +00:00
parent 00746c2ca4
commit e48f354031
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
2 changed files with 5 additions and 5 deletions

View File

@ -67,7 +67,7 @@ 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 -sel c'
Clipboard timeout: export PASH_TIMEOUT=10 ('off' to disable)
Clipboard timeout: export PASH_TIMEOUT=15 ('off' to disable)
```
## FAQ
@ -143,8 +143,8 @@ PASH_CLIP='xclip -sel c' pash copy github
Set the environment variable `PASH_TIMEOUT` to a valid `sleep` interval or `off` to disable the feature.
```sh
# Default: '10'
export PASH_TIMEOUT=10
# Default: '15'
export PASH_TIMEOUT=15
# Disable timeout.
export PASH_TIMEOUT=off

4
pash
View File

@ -67,7 +67,7 @@ pw_copy() {
# simplest method of aborting from a subshell.
[ "$PASH_TIMEOUT" != off ] && {
printf 'Clearing clipboard in "%s" seconds.\n' \
"${PASH_TIMEOUT:=10}"
"${PASH_TIMEOUT:=15}"
sleep "$PASH_TIMEOUT" || kill 0
$PASH_CLIP </dev/null
@ -139,7 +139,7 @@ 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 -sel c'
Clipboard timeout: export PASH_TIMEOUT=10 ('off' to disable)
Clipboard timeout: export PASH_TIMEOUT=15 ('off' to disable)
"
exit 1
}