diff options
author | Teddy Wing | 2016-11-14 02:17:47 -0500 |
---|---|---|
committer | Teddy Wing | 2016-11-14 02:17:47 -0500 |
commit | fbef6002a4a3dbcd008012a2b285a0a7a02da244 (patch) | |
tree | 783738877eb2fede7d06926cf47fd4f3407e3627 | |
parent | 426e7a89b6a00cdeab0dbbbb8b55eab37bc5c834 (diff) | |
parent | ba6e1914ae0484662485c3f35efabadfa883d09d (diff) | |
download | Passextract-fbef6002a4a3dbcd008012a2b285a0a7a02da244.tar.bz2 |
Merge branch 'flush-clipboard-on-quit'v0.3.0
-rw-r--r-- | Cargo.lock | 25 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/main.rs | 6 |
4 files changed, 31 insertions, 4 deletions
@@ -1,6 +1,6 @@ [root] name = "passextract" -version = "0.2.0" +version = "0.3.0" dependencies = [ "clipboard 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustty 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -185,3 +185,26 @@ dependencies = [ "pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[metadata] +"checksum block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +"checksum clipboard 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "811169a9ffda99ed1841a6db3c48cffbab9a9101376f77fee3c14a7581ab933d" +"checksum clipboard-win 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "238830bd83336a8620cbc1d6edf6b9222f45a2c52d02c164348fb6b466277b21" +"checksum gag 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c606f5c0da18075916377e73de8aec7c140e1b6110a3cf26ae1f47873529b47e" +"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +"checksum libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "23e3757828fa702a20072c37ff47938e9dd331b92fac6e223d26d4b7a55f7ee2" +"checksum malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +"checksum objc 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c9311aa5acd7bee14476afa0f0557f564e9d0d61218a8b833d9b1f871fa5fba" +"checksum objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +"checksum objc_id 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e4730aa1c64d722db45f7ccc4113a3e2c465d018de6db4d3e7dfe031e8c8a297" +"checksum pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8cee804ecc7eaf201a4a207241472cc870e825206f6c031e3ee2a72fa425f2fa" +"checksum rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2791d88c6defac799c3f20d74f094ca33b9332612d9aef9078519c82e4fe04a5" +"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" +"checksum rustty 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "79f6dcee0d7566faf07bc34682cae87115e93aa2dd9a29c7b8408ec898bd17b0" +"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" +"checksum tempfile 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9270837a93bad1b1dac18fe67e786b3c960513af86231f6f4f57fddd594ff0c8" +"checksum term 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3deff8a2b3b6607d6d7cc32ac25c0b33709453ca9cceac006caac51e963cf94a" +"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47" +"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" +"checksum windows-error 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfa34b3180ad6b4fe63cbc4fb773da4a83c5b3db8db15789051a4785f2b43e58" +"checksum x11 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfc828b6baf54ccdde44e0b5f16e035ab9c54f60a0f0c218fb5ddbc6ab38a2a9" @@ -1,6 +1,6 @@ [package] name = "passextract" -version = "0.2.0" +version = "0.3.0" [dependencies] clipboard = "0.1.2" @@ -38,7 +38,7 @@ The included Bash completion file provides the same tab completion options as In the interactive UI, the following commands are available: - q or Ctrl-C: Quit + q or Ctrl-C: Quit and clear the clipboard j: Move the selection down k: Move the selection up g: Move the selection to the top diff --git a/src/main.rs b/src/main.rs index 8e497c7..2a196d3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -117,7 +117,11 @@ fn main() { if let Some(Event::Key(ch)) = evt { match ch { 'q' | '\x03' => { - break; + // Clear the clipboard on quit + match clipboard_ctx.set_contents("".to_owned()) { + Ok(_) => break, + Err(_) => continue, + } } 'j' => { if selection.y < options.len() + 1 { |