shellcheck some scripts
This commit is contained in:
parent
b71b8f2ddf
commit
e414d8e14b
3 changed files with 9 additions and 7 deletions
12
bin/passget
12
bin/passget
|
|
@ -1,13 +1,15 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
if [ -z "$1" ]; then
|
||||
echo 'Nothing to get'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
contents=$(gopass show $1) || exit 1
|
||||
set -euo pipefail
|
||||
|
||||
contents=$(gopass show "$1") || exit 1
|
||||
echo "$contents" | grep '^user:' | cut -d' ' -f2 | xsel -b
|
||||
echo 'Username clipped'
|
||||
read
|
||||
read -r _
|
||||
|
||||
gopass show --clip $1
|
||||
gopass show --clip "$1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue