From 9037a5acc221cd58740182911702adde020a729e Mon Sep 17 00:00:00 2001 From: Evan Stoll Date: Tue, 6 Aug 2019 18:16:19 -0400 Subject: [PATCH] cht.sh: unstable-2018-11-02 -> unstable-2019-08-06 - Bump cht.sh to unstable-2019-08-06 - Add bash and zsh completions --- pkgs/tools/misc/cht.sh/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/cht.sh/default.nix b/pkgs/tools/misc/cht.sh/default.nix index 837bc0e9ed7..c81a3d5d25d 100644 --- a/pkgs/tools/misc/cht.sh/default.nix +++ b/pkgs/tools/misc/cht.sh/default.nix @@ -9,15 +9,15 @@ stdenv.mkDerivation rec { name = "cht.sh-${version}"; - version = "unstable-2018-11-02"; + version = "unstable-2019-08-06"; nativeBuildInputs = [ makeWrapper ]; src = fetchFromGitHub { owner = "chubin"; repo = "cheat.sh"; - rev = "9595805ac68b3c096f7c51fa024dcb97a7dfac44"; - sha256 = "11g8say5fksg0zg0bqrgl92rprn4lwp20g9rz1i0r38f0jy3nyrf"; + rev = "f507ba51d6bc1ae6c7df808cadbe4f8603951b6b"; + sha256 = "0r7x9a3qzzkbd1m5zdlkpmhx0p7b7ja42190s7fidls3dsm710g0"; }; # Fix ".cht.sh-wrapped" in the help message @@ -25,6 +25,12 @@ stdenv.mkDerivation rec { installPhase = '' install -m755 -D share/cht.sh.txt "$out/bin/cht.sh" + + # install shell completion files + mkdir -p $out/share/bash-completion/completions $out/share/zsh/site-functions + mv share/bash_completion.txt $out/share/bash-completion/completions/cht.sh + cp share/zsh.txt $out/share/zsh/site-functions/_cht + wrapProgram "$out/bin/cht.sh" \ --prefix PATH : "${stdenv.lib.makeBinPath [ curl rlwrap ncurses xsel ]}" '';