From 4f13d9c88e8a00ccb9ba8d5380db2f93d3f67908 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Wed, 5 Oct 2022 14:35:12 +0100 Subject: Add options to hide input for passwords etc. --- src/main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 55283b4..c0852f4 100644 --- a/src/main.c +++ b/src/main.c @@ -814,6 +814,8 @@ static void usage() " --history Sort results by number of usages.\n" " --fuzzy-match Use fuzzy matching for searching.\n" " --require-match Require a match for selection.\n" +" --hide-input Hide sensitive input such as passwords.\n" +" --hidden-character Replacement character for hidden input.\n" " --drun-launch Launch apps directly in drun mode.\n" " --drun-print-exec Print a command line in drun mode.\n" " This is now always the case,\n" @@ -864,6 +866,8 @@ const struct option long_options[] = { {"history", required_argument, NULL, 0}, {"fuzzy-match", required_argument, NULL, 0}, {"require-match", required_argument, NULL, 0}, + {"hide-input", required_argument, NULL, 0}, + {"hidden-character", required_argument, NULL, 0}, {"drun-launch", required_argument, NULL, 0}, {"drun-print-exec", required_argument, NULL, 0}, {"hint-font", required_argument, NULL, 0}, @@ -1007,6 +1011,7 @@ int main(int argc, char *argv[]) .font_name = "Sans", .font_size = 24, .prompt_text = "run: ", + .hidden_character_mb = "*", .padding_top = 8, .padding_bottom = 8, .padding_left = 8, -- cgit v1.2.3