about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2017-02-08 11:44:13 +0100
committerPeter Simons <simons@cryp.to>2017-02-08 11:45:50 +0100
commit187e5d3d745117dd5016e2b7cd796dd78ec7b41b (patch)
tree3d29b5f085127e2e0309c220f03f47ba0b16fc73
parent3bd6c44b5f2cb3b48569b468daef9fbc09d14d77 (diff)
downloadnixlib-187e5d3d745117dd5016e2b7cd796dd78ec7b41b.tar
nixlib-187e5d3d745117dd5016e2b7cd796dd78ec7b41b.tar.gz
nixlib-187e5d3d745117dd5016e2b7cd796dd78ec7b41b.tar.bz2
nixlib-187e5d3d745117dd5016e2b7cd796dd78ec7b41b.tar.lz
nixlib-187e5d3d745117dd5016e2b7cd796dd78ec7b41b.tar.xz
nixlib-187e5d3d745117dd5016e2b7cd796dd78ec7b41b.tar.zst
nixlib-187e5d3d745117dd5016e2b7cd796dd78ec7b41b.zip
taskwarrior: patch bug in bash-completion file
The patch was submitted upstream, too.
-rw-r--r--pkgs/applications/misc/taskwarrior/0001-bash-completion-quote-pattern-argument-to-grep.patch28
-rw-r--r--pkgs/applications/misc/taskwarrior/default.nix2
2 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/applications/misc/taskwarrior/0001-bash-completion-quote-pattern-argument-to-grep.patch b/pkgs/applications/misc/taskwarrior/0001-bash-completion-quote-pattern-argument-to-grep.patch
new file mode 100644
index 000000000000..8e5c0139e555
--- /dev/null
+++ b/pkgs/applications/misc/taskwarrior/0001-bash-completion-quote-pattern-argument-to-grep.patch
@@ -0,0 +1,28 @@
+From 0d677475b710b9bb61d4b3ac5435c36b47d3a155 Mon Sep 17 00:00:00 2001
+From: Peter Simons <simons@cryp.to>
+Date: Wed, 8 Feb 2017 11:28:42 +0100
+Subject: [PATCH] bash-completion: quote pattern argument to grep
+
+Without the quotes, bash might expand that pattern based on the contents of the
+current working directory or -- if nullglob is set -- the argument disappears
+outright if no directory entry matches.
+---
+ 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 e0c7fb03..d15ed3eb 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()
+ {
+-- 
+2.11.1
+
diff --git a/pkgs/applications/misc/taskwarrior/default.nix b/pkgs/applications/misc/taskwarrior/default.nix
index eea7ffdcaf23..0d8513cd12b4 100644
--- a/pkgs/applications/misc/taskwarrior/default.nix
+++ b/pkgs/applications/misc/taskwarrior/default.nix
@@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
     sha256 = "059a9yc58wcicc6xxsjh1ph7k2yrag0spsahp1wqmsq6h7jwwyyq";
   };
 
+  patches = [ ./0001-bash-completion-quote-pattern-argument-to-grep.patch ];
+
   nativeBuildInputs = [ cmake libuuid gnutls ];
 
   postInstall = ''