git.iko.soy/typeable/nixpkgs
on master help sign in
taskwarrior: patch bug in bash-completion file

The patch was submitted upstream, too.

commit187e5d3d745117dd5016e2b7cd796dd78ec7b41b authorPeter Simons <simons@cryp.to> dateWed 8 Feb 2017, 11:44 (10 years ago) parent3bd6c44
2 files changed+30
pkgs/applications/misc/taskwarrior/0001-bash-completion-quote-pattern-argument-to-grep.patch+28 pkgs/applications/misc/taskwarrior/default.nix+2
pkgs/applications/misc/taskwarrior/0001-bash-completion-quote-pattern-argument-to-grep.patchnew file+28
@@ -0,0 +1,28 @@
1+From 0d677475b710b9bb61d4b3ac5435c36b47d3a155 Mon Sep 17 00:00:00 2001
2+From: Peter Simons <simons@cryp.to>
3+Date: Wed, 8 Feb 2017 11:28:42 +0100
4+Subject: [PATCH] bash-completion: quote pattern argument to grep
5+
6+Without the quotes, bash might expand that pattern based on the contents of the
7+current working directory or -- if nullglob is set -- the argument disappears
8+outright if no directory entry matches.
9+---
10+ scripts/bash/task.sh | 2 +-
11+ 1 file changed, 1 insertion(+), 1 deletion(-)
12+
13+diff --git a/scripts/bash/task.sh b/scripts/bash/task.sh
14+index e0c7fb03..d15ed3eb 100644
15+--- a/scripts/bash/task.sh
16++++ b/scripts/bash/task.sh
17+@@ -72,7 +72,7 @@ _task_offer_contexts() {
18+ COMPREPLY=( $(compgen -W "$($taskcommand _context) define delete list none show" -- $cur) )
19+ }
20+
21+-_task_context_alias=$($taskcommand show | grep alias.*context | cut -d' ' -f1 | cut -d. -f2)
22++_task_context_alias=$($taskcommand show | grep "alias.*context" | cut -d' ' -f1 | cut -d. -f2)
23+
24+ _task()
25+ {
26+--
27+2.11.1
28+
pkgs/applications/misc/taskwarrior/default.nix+2
@@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
1111 sha256 = "059a9yc58wcicc6xxsjh1ph7k2yrag0spsahp1wqmsq6h7jwwyyq";
1212 };
1313
14+ patches = [ ./0001-bash-completion-quote-pattern-argument-to-grep.patch ];
15+
1416 nativeBuildInputs = [ cmake libuuid gnutls ];
1517
1618 postInstall = ''