profile
viewpoint
Conrad Kleinespel conradkleinespel Paris, France https://www.conradk.com

conradkleinespel/rpassword 130

Cross platform Rust library to read a password in the terminal (Linux, BSD, OSX, Windows).

conradkleinespel/rooster 102

The simple password manager for geeks, built with Rust.

conradkleinespel/rprompt 7

Cross-platform Rust library to prompt for things in console applications (Linux, BSD, OSX, Windows).

conradkleinespel/ram 3

FSM-based lexer generator lexing written in Rust.

conradkleinespel/k3s 0

Lightweight Kubernetes

conradkleinespel/rooster-arch 0

Arch Linux package for Rooster.

PR closed rancher/k3s

fixes typo

Proposed Changes

Fix typo in README.md

Types of Changes

Typo fix

Verification

n/a

Linked Issues

n/a

Further Comments

n/a

+1 -1

0 comment

1 changed file

conradkleinespel

pr closed time in 3 days

PR opened rancher/k3s

fixes typo

Proposed Changes

Fix typo in README.md

Types of Changes

Typo fix

Verification

n/a

Linked Issues

n/a

Further Comments

n/a

+1 -1

0 comment

1 changed file

pr created time in 3 days

push eventconradkleinespel/k3s

Conrad Kleinespel

commit sha 267ee215d03ea77d55c656af5a177010ca566e12

fixes typo

view details

push time in 3 days

fork conradkleinespel/k3s

Lightweight Kubernetes

https://k3s.io

fork in 3 days

issue commentmikefarah/yq

folded multiline scalars should stay in their original format

If this is to be done, having a CLI flag would definitely be useful. yq is useful to see how one's YAML file is interpreted by a other programs. I'd want the current behavior to be the default (because that's what a program reading a YAML file sees) and have a flag like --debug that disables folding if you need it.

Shanuson

comment created time in 2 months

push eventconradkleinespel/rooster

Conrad Kleinespel

commit sha 236ffa21028e5ec4ae2f06c5d9c9078531929296

Updates dependencies

view details

push time in 2 months

created tagconradkleinespel/rpassword

tagv5.0.0

Cross platform Rust library to read a password in the terminal (Linux, BSD, OSX, Windows).

created time in 3 months

release conradkleinespel/rpassword

v5.0.0

released time in 3 months

push eventconradkleinespel/rpassword

Conrad Kleinespel

commit sha c786de157b15ea326c5e21f6270b0b5ca1e498f9

Bump to v5 (#52) bumps to v5, updates contributor list

view details

push time in 3 months

PR merged conradkleinespel/rpassword

Bump to v5

Release text

The signature of read_password_with_reader has changed from:

pub fn read_password_with_reader<T>(source: Option<T>) -> ::std::io::Result<String>
    where
        T: ::std::io::BufRead

to

pub fn read_password_with_reader<T>(source: Option<&mut T>) -> ::std::io::Result<String>
    where
        T: ::std::io::BufRead

This allows to call read_password_with_reader multiple times with the same reader. Thanks @dvermd for this contribution!

+9 -88

0 comment

4 changed files

conradkleinespel

pr closed time in 3 months

push eventconradkleinespel/rpassword

Conrad Kleinespel

commit sha 80b5262236a9d5564d222375b2c17da634c31660

updates readme

view details

push time in 3 months

issue closedconradkleinespel/rpassword

Masked echo functionality

I’d like a way to provide per-keystroke feedback, such as printing "•" or "***" for each character that the user enters. (I have some users who are just getting accustomed to terminals, and this is one of their first interactions. Oh, and I’m having them paste a big long key, not just type a password that they know.)

Even better, something like this:

pub fn read_password_with_hook<F>(hook: F) -> std::io::Result<()>
where F: FnMut(char) -> std::io::Result<bool>;  // Ok(true) means continue

would let me write my thing (quick and dirty):

fn read_with_echo(echo: &str) -> Result<String> {
    let mut result = String::new();

    read_password_with_hook(|c|
        if c == '\n' {
            tty_print_raw!("\n")?;
            Ok(false)
        } else {
            if c != '\r' {
                result.push(c);
                tty_print_raw!("{}", echo)?;
            }
            Ok(true)
        })?;

    Ok(result)
}

If you like this idea, I’m happy to implement it and submit a PR. There’s probably a better design than read_password_with_hook, and I’m happy to discuss that too. Are you interested?

closed time in 3 months

tov

issue commentconradkleinespel/rpassword

Masked echo functionality

Given this issue is now 6 months old without change, I'll go ahead and close it. Feel free to reopen it you want to keep working on this.

tov

comment created time in 3 months

push eventconradkleinespel/rpassword

Conrad Kleinespel

commit sha 919931ca127c54647b3e134ed4790135db352b4e

Removes legacy mock

view details

push time in 3 months

push eventconradkleinespel/rpassword

Nicolas Koch

commit sha acff1bd903692fe0327826b94d3523733817fbb4

Various minor code cleanups (#47) * Various minor code cleanups - Fix wrong identation - Make error handling more idiomatic * Remove an unneeded if let

view details

dvermd

commit sha ce2297cfbcbec0c55716fefd311fa15561ae6bb0

Improve mock with enhanced_mock feature

view details

Conrad Kleinespel

commit sha 56b8c1cc859655ae21f6bb963d33e24d9e0c45b0

Bump to v5

view details

Conrad Kleinespel

commit sha e4642b7326d48a48bc591c4caf99dd72d0ab5f70

adds nicokoch to contributors

view details

Conrad Kleinespel

commit sha d8cb01e867c6f40358c403d71d2380fbb6f82752

adds @dvermd to contributors

view details

push time in 3 months

issue closedconradkleinespel/rpassword

Read several passwords from reader

For testing purpose, I'm migrating calls from prompt_password_stdout to read_password_with_reader. I'm facing a problem with the signature

pub fn read_password_with_reader<T>(source: Option<T>) -> ::std::io::Result<String>
    where T: ::std::io::BufRead {

which "consumes" the BufRead and doesn't make it possible to be called several times with the same reader.

Would you consider changing the signature to

fn read_password_with_reader<T>(source: Option<&mut T>) -> ::std::io::Result<String>
where
    T: ::std::io::BufRead,

instead ?

closed time in 3 months

dvermd

issue commentconradkleinespel/rpassword

Read several passwords from reader

The changes have been merged :heavy_check_mark:

dvermd

comment created time in 3 months

pull request commentconradkleinespel/rpassword

wip: Improve mock with enhanced_mock feature

I've cherry-picked your code here: https://github.com/conradkleinespel/rpassword/commit/ce2297cfbcbec0c55716fefd311fa15561ae6bb0

I'll now remove the "legacy_mock" and publish as v5 to crates.io.

Thanks for your help !

dvermd

comment created time in 3 months

push eventconradkleinespel/rpassword

dvermd

commit sha ce2297cfbcbec0c55716fefd311fa15561ae6bb0

Improve mock with enhanced_mock feature

view details

push time in 3 months

push eventdvermd/rpassword

Martinez

commit sha 189c3888341f082738a3efbd7287aaf4ce64d792

Skip calling Windows console api with piped stdin (#51) * skip calling windows console api with piped stdin * test with piped stdin * upgrade appveyor's rustc to 1.44.0

view details

Nicolas Koch

commit sha acff1bd903692fe0327826b94d3523733817fbb4

Various minor code cleanups (#47) * Various minor code cleanups - Fix wrong identation - Make error handling more idiomatic * Remove an unneeded if let

view details

Conrad Kleinespel

commit sha d3936d119c8f170075e1879d0b8892514b688891

Merge branch 'master' into mock_many_times

view details

push time in 3 months

more