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