summary refs log tree commit diff
path: root/pkgs/shells/fish
diff options
context:
space:
mode:
authorNathan Zadoks <nathan@nathan7.eu>2015-12-27 16:36:46 +0100
committerNathan Zadoks <nathan@nathan7.eu>2015-12-28 15:09:48 +0100
commitefd9562df02e70d5eb97c9fe11238ae8135bbf4b (patch)
tree1a06ddaa3c0e451edb46d64e81aea6171ddd7592 /pkgs/shells/fish
parent254eebd8a0782430dfb0b78bef3b657ad0caed8a (diff)
downloadnixpkgs-efd9562df02e70d5eb97c9fe11238ae8135bbf4b.tar
nixpkgs-efd9562df02e70d5eb97c9fe11238ae8135bbf4b.tar.gz
nixpkgs-efd9562df02e70d5eb97c9fe11238ae8135bbf4b.tar.bz2
nixpkgs-efd9562df02e70d5eb97c9fe11238ae8135bbf4b.tar.lz
nixpkgs-efd9562df02e70d5eb97c9fe11238ae8135bbf4b.tar.xz
nixpkgs-efd9562df02e70d5eb97c9fe11238ae8135bbf4b.tar.zst
nixpkgs-efd9562df02e70d5eb97c9fe11238ae8135bbf4b.zip
fish: pass all of argv to command-not-found
Diffstat (limited to 'pkgs/shells/fish')
-rw-r--r--pkgs/shells/fish/command-not-found.patch13
-rw-r--r--pkgs/shells/fish/default.nix2
2 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/shells/fish/command-not-found.patch b/pkgs/shells/fish/command-not-found.patch
new file mode 100644
index 00000000000..aaca001dcb6
--- /dev/null
+++ b/pkgs/shells/fish/command-not-found.patch
@@ -0,0 +1,13 @@
+diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish
+index c3864a8..a12ac4d 100644
+--- a/share/functions/__fish_config_interactive.fish
++++ b/share/functions/__fish_config_interactive.fish
+@@ -230,7 +230,7 @@ function __fish_config_interactive -d "Initializations that should be performed
+ 		# Check for NixOS handler
+ 		else if test -f /run/current-system/sw/bin/command-not-found
+ 			function __fish_command_not_found_handler --on-event fish_command_not_found
+-				/run/current-system/sw/bin/command-not-found $argv[1]
++				/run/current-system/sw/bin/command-not-found $argv
+ 			end
+ 		# Ubuntu Feisty places this command in the regular path instead
+ 		else if type -q -p command-not-found
diff --git a/pkgs/shells/fish/default.nix b/pkgs/shells/fish/default.nix
index ef3794d5144..c2fcfa3e7c1 100644
--- a/pkgs/shells/fish/default.nix
+++ b/pkgs/shells/fish/default.nix
@@ -4,6 +4,8 @@ stdenv.mkDerivation rec {
   name = "fish-${version}";
   version = "2.2.0";
 
+  patches = [ ./command-not-found.patch ];
+
   src = fetchurl {
     url = "http://fishshell.com/files/${version}/${name}.tar.gz";
     sha256 = "0ympqz7llmf0hafxwglykplw6j5cz82yhlrw50lw4bnf2kykjqx7";