From f78960c3829a3d9917cbf0f562da3f864ee4474a Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 22 Sep 2019 15:40:26 -0700 Subject: Added history through the --history= flag. --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 1d8a036..ece7021 100644 --- a/README.md +++ b/README.md @@ -17,5 +17,20 @@ Here's a simple program to move a file from the current directory: file="`ls | ask "Pick a file: "`" mv "$file" "`ask "Move $file to: "`" +`ask` also supports a few other command line options: + +* `ask -y` or `ask --yes` and `ask -n` or `ask --no` will append " [Y/n]" or + " [y/N]" respectively to the prompt, and provide "Y" and "N" as the only + options, and will exit with success or failure accordingly. (e.g. `if ask + --yes "Continue?"; then ...`) +* `ask --quickpick` or `ask -Q` will pick an option automatically without + pressing enter if there is only one valid option. +* `ask --password` or `ask -P` will show a typing indicator without displaying + the typed letters on the screen. (e.g. `password="$(ask -P "Enter your + password: ")"`) +* `ask --history=` will load/save previous `ask` responses in + `$XDG_DATA/ask/.hist` (`~/.local/share/ask/.hist` by default) for + use with up/down arrow keys. Maximum of 1000 entries are stored per log file. + ## License `ask` is released under the MIT License. See LICENSE for details. -- cgit v1.2.3