aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2022-08-20CHANGELOG: Include EX_NOINPUT changeHEADv0.5.0masterTeddy Wing
2022-08-20CHANGELOG: Include version argument updateTeddy Wing
2022-08-20main: Exit with `EX_NOINPUT` when no password copy options are presentTeddy Wing
I wrote this program before I started using sysexits. Now, a different exit code makes more sense.
2022-08-20main: Remove version argument TODOsTeddy Wing
2022-08-20doc: Add version argument to man pageTeddy Wing
2022-08-20Add version command line argumentTeddy Wing
* -V and --version now print the program version and exit * Use the `exitcode` crate * Rename `options` variable to `accepted_args`, which seems clearer given its usage.
2022-08-20main: Rename `options` variable to `copy_options`Teddy Wing
When investigating how to add a `--version` argument, I was confused by this naming and thought that "options" referred to command line options. Rename the variable to make its purpose clearer.
2022-08-20main: Idea for new exit code when no copy optionsTeddy Wing
2022-08-20main: Idea for `--version` argumentTeddy Wing
2022-08-20Increase version v0.4.0 -> v0.5.0Teddy Wing
2022-08-20README: Use `teddywing/formulae` Homebrew tapTeddy Wing
Stop recommending the project's repo as a Homebrew tap.
2022-08-20Update copyright yearsTeddy Wing
2022-08-20Merge branch 'support-gnupg2'Teddy Wing
2022-08-20parse_options: Clean up `Command.spawn` codeTeddy Wing
* Remove old in-progress code * Remove `child.stdout.take()` call, which is suggested in https://doc.rust-lang.org/std/process/struct.Child.html#structfield.stdout but ended up not being necessary in this instance.
2022-08-20Spawn `pass` in order to support GnuPG 2 and PinentryTeddy Wing
Previously, Passextract didn't work with GnuPG 2 because I was immediately collecting the output of `pass`. With GnuPG 1.4, the password prompt was like a conventional `read`-style password prompt. However, in GnuPG 2, the prompt is replaced with Pinentry. Pinentry interferes with capturing the output from Pass, such that Passextract exits immediately, without even prompting for a password. Instead of using `Command.output`, use `Command.spawn`. This allows GnuPG to work correctly and display a Pinentry prompt. We can then capture the standard output from the child process and parse it for the Passextract interface.
2022-08-20Cargo.lock: Rebuild with Rust 1.59.0Teddy Wing
$ rustc --version rustc 1.59.0 (9d1b2106e 2022-02-23)
2018-04-22Makefile(release): Remove `&&`sTeddy Wing
We don't actually need these since we're not `cd`ing anywhere. For whatever reason when I had written this it just felt like I needed the `&&`s, but that's really not the case. Get rid of them to improve simplicity.
2018-03-03README: Update installation instructions for HomebrewTeddy Wing
Recommend that Mac OS X users install the program using Homebrew with the formula included in the repo.
2018-03-03HomebrewFormula: Specify versionTeddy Wing
Homebrew appeared to get confused when trying to get the version from the URL. It looked like it was getting '64' from 'osx_amd64'. I was getting this error when trying to install the formula: $ brew upgrade teddywing/passextract/passextract ==> Upgrading 1 outdated package, with result: teddywing/passextract/passextract 64 Error: Calling build.build_bottle? is disabled! Use build.bottle? instead. /usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:121:in `upgrade_formula'
2018-03-03Merge branch 'add-Homebrew-formula'Teddy Wing
2018-03-03Add Homebrew formulaTeddy Wing
To make it easier to install the program including shell completion and the man page (at least on OS X).
2018-03-03Increase version v0.3.0 -> v0.4.0v0.4.0Teddy Wing
2018-03-03Update copyright yearsTeddy Wing
2018-03-03Merge branch 'release-script'Teddy Wing
2018-03-03Makefile: Add a `release` targetTeddy Wing
Script the release process to make it easier to build a tar containing the executable, Bash completion, and the man page.
2018-03-03Merge branch 'create-man-page'Teddy Wing
2018-03-03Merge branch 'invisible-password'Teddy Wing
2018-03-03Makefile: Clean up man page bold literal transformationTeddy Wing
Instead of the messy variables we were using, which caused `passextract.1.txt.tmp` and `passextract.1` files to be generated at the root of the project, create a few new targets to do the "`"` to "*" transformation and build the man page from a temporary file.
2018-03-03passextract.1: Make literals boldTeddy Wing
To more clearly identify literals in "`literal`" blocks in the man page, make them bold by doing a simple text replacement on them. Note that this Makefile makes a `passextract.1` file at the root of the project. Need to fix that.
2018-03-03Add man pageTeddy Wing
Provide a man page for in situ documentation. Use AsciiDoc to generate the man page. Yay, my first man page! Resources: - https://github.com/BurntSushi/ripgrep/blob/fe9be65/build.rs - https://github.com/BurntSushi/ripgrep/blob/f5411b9/doc/rg.1.txt.tpl - http://www.methods.co.nz/asciidoc/asciidoc.1.txt - https://github.com/git/git/blob/23f8239/Documentation/git-clean.txt - https://github.com/git/git/blob/8a8f121049fdd881981799755a041b3f81449805/Documentation/asciidoctor-extensions.rb - http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/ - https://github.com/git/git/commit/5945717009cbd07fc303939452df6475ac342fe7
2018-03-03When `-i`, replace password with '*'sTeddy Wing
Previously, when the "invisible" flag was activated, we wouldn't print anything except the "p: " prefix on a password line. This made it difficult to verify the password, and if you for some reason had multiple passwords, you wouldn't know which one to pick unless you knew the order. This at least gives you a visual cue about your password.
2018-03-02Merge branch 'add-changelog'Teddy Wing
2018-03-02Add CHANGELOGTeddy Wing
Copy over our Git tag messages with: $ git tag -n99 Reformat them and put them in reverse chronological order.
2018-03-01Clean up condition for getting file path from argumentTeddy Wing
Instead of the convoluted hard-to-read `hide_password &&` nonsense, give ourselves a way to express the condition in terms of the argument _not_ being one of our accepted options (only `-i`). This ensures that we either capture the filename in the last argument or use STDIN.
2018-03-01Use `-i` argument to hide passwordsTeddy Wing
Connect the `-i` argument flag to the renderer. If the arg was passed, hide passwords, otherwise show them. Change `args.first()` to `args.get(1)` because the actual first element is the command executable. Not happy with the condition I'm using here to grab the password file or the STDIN `-`. It doesn't read well at all. It all does work, but this part I want to rewrite to make it easier to read.
2018-03-01Try to match `-i` argumentTeddy Wing
Turn on a `hide_password` boolean variable if an `-i` argument is passed in (haven't tested this yet). This tells us whether the user wants us to hide the password in the selection interface.
2018-02-24Make password line invisibleTeddy Wing
Instead of rendering the password string, hide it while allowing it to be copied. It is identified by the "p: " prefix, but nothing follows that. This allows you to run `passextract` without having to worry about others peering over your shoulder or about screen capture or recording hacks. I'll be adding a command line flag to force you to opt in to this feature, while keeping the old functionality the same.
2018-02-24Recompile with Rust 1.24.0Teddy Wing
$ rustc --version rustc 1.24.0 (4d90ac38c 2018-02-12)
2016-11-14Merge branch 'flush-clipboard-on-quit'v0.3.0Teddy Wing
2016-11-14Cargo: Increase version v0.2.0 -> v0.3.0Teddy Wing
2016-11-14README: Add a note about the clipboard being cleared on quitTeddy Wing
2016-11-14Clear clipboard on quitTeddy Wing
The last thing copied from Passextract will stick around in your clipboard, potentially opening up your password to accidental pasting or a clipboard exploit. Pass deals with this in a nice way, by restoring your clipboard back to what was copied before after a set time delay. Here that same functionality is more difficult to achieve because the Clipboard crate can only deal with strings. So if for example you've copied a file, an image, a program's proprietary type, or some other binary data, it can't be restored with the Clipboard crate. Pass is able to do this because it uses the OS X `pbcopy`/`pbpaste` commands under the hood, which do support binary data. We could do that here I suppose, but it's easier and cross-platform to leverage a library. My heavy-handed solution to the problem of clipboard insecurity is to just overwrite the clipboard with an empty string when Passextract quits. The solution is not ideal because it doesn't preserve your past clipboard entry, and it forces you to keep the Passextract menu open until you paste the copied entry, but it's better than nothing when it comes to keeping the clipboard secure. If there's an error writing to the clipboard, Passextract will refuse to quit.
2016-11-14Cargo.lock: Upgrade to Rust 1.13.0Teddy Wing
Rebuild the program with the latest stable version of Rust.
2016-08-17README: Add information about `g` & `G` mappingsv0.2.0Teddy Wing
2016-08-17Cargo: Increase version v0.1.1 -> v0.2.0Teddy Wing
2016-08-17Merge branch 'g-jump-mappings'Teddy Wing
2016-08-17Add support for `g` and `G` movementsTeddy Wing
`g`: moves the selection to the first option `G`: moves the selection to the last option This allows for faster selection if there are more than 2–3 options. Using `g` still allows `gg` to work since doubling the command doesn't change its meaning.
2016-08-06Cargo: Update version v0.1.0 -> v0.1.1v0.1.1Teddy Wing
2016-08-06Merge branch 'fix-passwords-containing-colon-space'Teddy Wing
2016-08-06strip_key: Fix for values that contain ": "Teddy Wing
Values that contained ": " would not be parsed correctly for copying to the clipboard. If, for example, a password contained ": ", those characters and any following them wouldn't be copied. This change allows such passwords to be copied correctly.