diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-15 17:11:31 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-15 17:11:31 +1200 |
commit | 85163378bca88d16c5629009e4ab43a621fbe57c (patch) | |
tree | f2486557df78798a3272293a7cc899ecabdf1cf4 /bin | |
parent | Adjust wrapping in dmp(1) man page (diff) | |
download | dotfiles-85163378bca88d16c5629009e4ab43a621fbe57c.tar.gz dotfiles-85163378bca88d16c5629009e4ab43a621fbe57c.zip |
Allow timeout argument to dmp(1)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dmp | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,5 +1,8 @@ #!/bin/sh +# Sole optional argument is the password timeout (defaults to 10 seconds) +timeout_sec=${1:-10} + # Get the password store directory, bail if we can't pwsd=${PASSWORD_STORE_DIR:-$HOME/.password-store} pwsd=${pwsd%/} @@ -23,4 +26,4 @@ pw=$( [ -n "$pw" ] || exit # Pump the password into the clipboard xsel(2); allow 10 seconds -pass show "$pw" | xsel -ibt 10000 +pass show "$pw" | xsel -ibt "$((timeout_sec * 1000))" |