Commits


decode file names in the current locale Otherwise we output gibberish and the pattern argument to `plass find' may not even match the entries. Issue reported by Anton Kasimov, thank you!


use File::Path' make_path instead of rolling my own again from volker' plage.pl, thanks!


use extended regular expressions in `plass find' from volker' plage.pl, thanks!


use foreach instead of map to print the matching entries from volker' plage.pl


missing semicolon; from volker' plage.pl


fix undefined behaviour reported by perlcritic "return" statement followed by "sort" at line 140, column 2. Behavior is undefined if called in scalar context. (Severity: 5) the fix is the same as in volker' plage(1).


avoid issuing unnecessary `got add' plass always did a `got add $file' before committing changes. However, this leads to a possibly misleading "file has unexpected status" error being printed to stderr. Instead, `got add $file' only when the file is new.


refactor cmd_edit Now it always deletes the temporary file.


plass tee: set binmode to avoid mangling binary data


refactor cmd_tee: simplify the code inline (with tweaks) writepass, it's redundant to have. While here also read/write blockwise instead that of linewise.


remove handling of PLASS_GOT environment variable There's no real reason to have this variable, there's only one `got' usually and people are better off putting it somewhere in $PATH. Retain PLASS_GPG as there seem to be a little issue with gpg vs gpg2 so the knob may be useful in practice.


bump copyright


plass edit: delete the temp file File::Temp lied. it says UNLINK defaults to true but the files were still in my /tmp. Quick workaround, needs something better that takes care also of cleaning up on die().


add `edit' subcommand to interactively modify an entry It's more or less equivalent to $ cd /tmp $ umask 077 $ plass cat entry > tempfile $ $EDITOR tempfile $ plass tee entry < tempfile $ rm tempfile but way easier. It's also safer because it creates an unique randomly named file set up with correct permissions. Suggested by heph, thanks!


make `plass find' case-insensitive This does not affect `plass cat', `plass tee' etc, only the `find' sub-command. Discussed with heph.