diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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. |
