stuff
This commit is contained in:
parent
40fa47aa34
commit
78faa96e1f
11 changed files with 313 additions and 21 deletions
|
|
@ -1,9 +1,9 @@
|
|||
function prompt --description 'Opens a menu of a list of Strings and writes the result to stdout'
|
||||
argparse h/help p/prompt=? placeholder=? password -- $argv
|
||||
argparse h/help p/prompt=? placeholder=? mesg=? password -- $argv
|
||||
or return
|
||||
|
||||
if set -ql _flag_help
|
||||
echo "menu [-h|--help] [-p|--prompt=?] [--placeholder=?] [--password] [STRING ...]"
|
||||
echo "menu [-h|--help] [-p|--prompt=?] [--placeholder=?] [--mesg=?] [--password] [STRING ...]"
|
||||
return 0
|
||||
end
|
||||
|
||||
|
|
@ -17,9 +17,13 @@ function prompt --description 'Opens a menu of a list of Strings and writes the
|
|||
set -a fuzzel_args "--placeholder=$_flag_placeholder"
|
||||
end
|
||||
|
||||
if set -ql _flag_password
|
||||
set -a fuzzel_args "--password=●"
|
||||
if set -ql _flag_mesg
|
||||
set -a fuzzel_args "--mesg=$_flag_mesg"
|
||||
end
|
||||
|
||||
string join -- \n $argv | fuzzel --dmenu --prompt-only='' $fuzzel_args || exit 0
|
||||
if set -ql _flag_password
|
||||
set -a fuzzel_args "--password"
|
||||
end
|
||||
|
||||
string join -- \n $argv | fuzzel --dmenu --prompt-only='' $fuzzel_args
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue