summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-10-05 14:35:12 +0100
committerPhil Jones <philj56@gmail.com>2022-10-05 14:35:12 +0100
commit4f13d9c88e8a00ccb9ba8d5380db2f93d3f67908 (patch)
tree91506378e4d30edad5178238267d9a3132dcf146 /src/main.c
parent803b0d14b7ac8ea03105613fa25849d460073357 (diff)
Add options to hide input for passwords etc.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
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 <true|false> Sort results by number of usages.\n"
" --fuzzy-match <true|false> Use fuzzy matching for searching.\n"
" --require-match <true|false> Require a match for selection.\n"
+" --hide-input <true|false> Hide sensitive input such as passwords.\n"
+" --hidden-character <char> Replacement character for hidden input.\n"
" --drun-launch <true|false> Launch apps directly in drun mode.\n"
" --drun-print-exec <true|false> 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,