aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-09-22 15:40:26 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-09-22 15:40:26 -0700
commitf78960c3829a3d9917cbf0f562da3f864ee4474a (patch)
treea485f6acf25f834b82220ff6a1a8668562ce3cb1 /README.md
parent0ec5a7475ca70222af19a149ad34fe2d482ae744 (diff)
Added history through the --history=<name> flag.
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 15 insertions, 0 deletions
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=<name>` will load/save previous `ask` responses in
+ `$XDG_DATA/ask/<name>.hist` (`~/.local/share/ask/<name>.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.