From 1f2c5bfed7cdda0127722305bcbf7adaa5082d0f Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Tue, 2 Aug 2016 14:48:50 +0300 Subject: [PATCH] Scripts: Quoted regular expression to avoid bash glob expansion The quote is needed, otherwise it is treated as a bash glob first, which causes trouble if there actually happens to be matching files, and fails entirely if `shopt -s failglob` is set. --- scripts/bash/task.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bash/task.sh b/scripts/bash/task.sh index e0c7fb039..ecb4fd528 100644 --- a/scripts/bash/task.sh +++ b/scripts/bash/task.sh @@ -72,7 +72,7 @@ _task_offer_contexts() { COMPREPLY=( $(compgen -W "$($taskcommand _context) define delete list none show" -- $cur) ) } -_task_context_alias=$($taskcommand show | grep alias.*context | cut -d' ' -f1 | cut -d. -f2) +_task_context_alias=$($taskcommand show | grep 'alias.*context' | cut -d' ' -f1 | cut -d. -f2) _task() {