[pass] [PATCH v2] clip: don't race between pass instances in restore

Matthew Cengia mattcen at gmail.com
Sat Mar 22 08:31:00 CET 2014


On 2014-03-22 01:20, Jason A. Donenfeld wrote:
[...]
> The && sleep 0.1 is to give the parent process of the killed sleep time to
> restore the clipboard.

Sorry, I can't think of a better way to do that right now.

> Woah!! It turns out xclip has a -l option. With -l 1, it could block until
> it's been pasted, and then restore and quit. Sounds nice...
> 
> Question: does pbpaste do that on OSX?

Apparently not. The manpage as at OSX 10.9.2 is attached; it's pretty
primative.

-- 
Regards,
Matthew Cengia
-------------- next part --------------
PBCOPY(1)                                                            PBCOPY(1)



NAME
       pbcopy,  pbpaste  -  provide copying and pasting to the pasteboard (the
       Clipboard) from command line

SYNOPSIS
       pbcopy [-help] [-pboard {general | ruler | find | font}]

       pbpaste [-help] [-pboard {general | ruler | find | font}] [-Prefer {txt
       | rtf | ps}]

DESCRIPTION
       pbcopy  takes  the standard input and places it in the specified paste-
       board. If no pasteboard is specified, the general  pasteboard  will  be
       used  by  default.  The input is placed in the pasteboard as plain text
       data unless it begins  with  the  Encapsulated  PostScript  (EPS)  file
       header  or  the Rich Text Format (RTF) file header, in which case it is
       placed in the pasteboard as one of those data types.

       pbpaste removes the data from the pasteboard and writes it to the stan-
       dard output.  It normally looks first for plain text data in the paste-
       board and writes that to the standard output; if no plain text data  is
       in  the  pasteboard  it looks for Encapsulated PostScript; if no EPS is
       present it looks for Rich Text.  If none of those types is  present  in
       the pasteboard, pbpaste produces no output.

       * Encoding:

       pbcopy  and  pbpaste  use locale environment variables to determine the
       encoding to be used for input and output.  For  example,  absent  other
       locale settings, setting the environment variable LANG=en_US.UTF-8 will
       cause pbcopy and pbpaste to use UTF-8 for  input  and  output.   If  an
       encoding  cannot be determined from the locale, the standard C encoding
       will be used.  Use of UTF-8 is recommended.  Note that by  default  the
       Terminal application uses the UTF-8 encoding and automatically sets the
       appropriate locale environment variable.

OPTIONS
       -pboard {general | ruler | find | font}
              specifies which pasteboard to copy to  or  paste  from.   If  no
              pasteboard  is  given,  the  general  pasteboard will be used by
              default.

       -Prefer {txt | rtf | ps}
              tells pbpaste what type of data to look for  in  the  pasteboard
              first.   As stated above, pbpaste normally looks first for plain
              text data; however,  by  specifying  -Prefer  ps  you  can  tell
              pbpaste to look first for Encapsulated PostScript.  If you spec-
              ify -Prefer rtf, pbpaste looks first for Rich Text  format.   In
              any  case,  pbpaste looks for the other formats if the preferred
              one is not found.  The txt option replaces the deprecated  ascii
              option,  which continues to function as before.  Both indicate a
              preference for plain text.

SEE ALSO
       ADC Reference Library:
       Cocoa > Interapplication Communication > Copying and Pasting
       Carbon > Interapplication Communication > Pasteboard  Manager  Program-
       ming Guide
       Carbon > Interapplication Communication > Pasteboard Manager Reference

BUGS
       There is no way to tell pbpaste to get only a specified data type.



Apple Computer, Inc.           January 12, 2005                      PBCOPY(1)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: Digital signature
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20140322/9c7edad7/attachment.asc>


More information about the Password-Store mailing list