Skip to content

Commit

Permalink
🚸 Add shell completion for proxychains
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Dec 1, 2024
1 parent 73ce28e commit ba9e696
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkgs/shells/symlinks/proxychains-symlinks/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
lib,
stdenvNoCC,
proxychains,
fetchurl,
}:
stdenvNoCC.mkDerivation {
name = "proxychains-symlinks";
srcs = [ ];
sourceRoot = ".";
src = (
fetchurl {
url = "https://raw.githubusercontent.com/haad/proxychains/refs/commit/02409fba797da68fa6a06c2c9290e8e43366fd8a/completions/zsh/_proxychains4";
sha256 = "sha256-pvqN40tZiGzITgSJm6FpwlOuMx2oHn7OOU4uhyEF7Bo=";
}
);

dontUnpack = true;
dontConfigure = true;
Expand All @@ -16,6 +21,7 @@ stdenvNoCC.mkDerivation {

installPhase = ''
install -d "$out"/{bin,share/zsh/site-functions}
install -Dm644 $src "$out/share/zsh/site-functions/_proxychains4"
ln -s "${proxychains}/bin/proxychains4" "$out/bin/proxychains"
echo -e '#compdef proxychains=proxychains4\n_proxychains4' > "$out/share/zsh/site-functions/_proxychains"
'';
Expand Down

0 comments on commit ba9e696

Please sign in to comment.