We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cur
1 parent 5330fbe commit a244587Copy full SHA for a244587
completions/mutt
@@ -99,11 +99,13 @@ _comp_cmd_mutt__aliases()
99
# @param $1 (cur) Current word to complete
100
_comp_cmd_mutt__query()
101
{
102
- local cur=$1 querycmd muttcmd=${words[0]}
+ local cur=$1
103
+ [[ $cur ]] || return 0
104
+ local querycmd muttcmd=${words[0]}
105
local -a queryresults
106
107
querycmd="$("$muttcmd" -Q query_command 2>/dev/null | command sed -e 's|^query_command=\"\(.*\)\"$|\1|' -e 's|%s|'"$cur"'|')"
- if [[ $cur && $querycmd ]]; then
108
+ if [[ $querycmd ]]; then
109
local REPLY
110
_comp_expand_tilde "$querycmd"
111
querycmd=$REPLY
0 commit comments