pash: simplify clipboard

This commit is contained in:
Dylan Araps 2019-11-28 18:37:56 +00:00
parent 645c889474
commit 224b600746
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 3 additions and 9 deletions

12
pash
View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -f
#
# pash - simple password manager.
@ -68,15 +68,9 @@ pw_copy() {
pw_show "$1" copy
# Disable warning against words-splitting as it is safe
# and intentional. The '-f' disables globbing while the
# clipboard string is split.
# and intentional (globbing is disabled).
# shellcheck disable=2086
{
set -f
set +f ${PASH_CLIP:-xclip -selection clipboard}
}
printf %s "$pass" | "$@"
printf %s "$pass" | ${PASH_CLIP:-xclip -selection clipboard}
}
pw_list() {