lol

oci-cli: install shell completion

+21
+21
pkgs/tools/admin/oci-cli/default.nix
··· 2 2 , fetchFromGitHub 3 3 , fetchPypi 4 4 , python3 5 + , installShellFiles 5 6 }: 6 7 7 8 let ··· 46 47 hash = "sha256-yooEZuSIw2EMJVyT/Z/x4hJi8a1F674CtsMMGkMAYLg="; 47 48 }; 48 49 50 + nativeBuildInputs = [ installShellFiles ]; 51 + 49 52 propagatedBuildInputs = [ 50 53 arrow 51 54 certifi ··· 71 74 --replace "prompt-toolkit==3.0.29" "prompt-toolkit" \ 72 75 --replace "terminaltables==3.1.0" "terminaltables" \ 73 76 --replace "oci==2.78.0" "oci" 77 + ''; 78 + 79 + postInstall = '' 80 + cat >oci.zsh <<EOF 81 + #compdef oci 82 + zmodload -i zsh/parameter 83 + autoload -U +X bashcompinit && bashcompinit 84 + if ! (( $+functions[compdef] )) ; then 85 + autoload -U +X compinit && compinit 86 + fi 87 + 88 + EOF 89 + cat src/oci_cli/bin/oci_autocomplete.sh >>oci.zsh 90 + 91 + installShellCompletion \ 92 + --cmd oci \ 93 + --bash src/oci_cli/bin/oci_autocomplete.sh \ 94 + --zsh oci.zsh 74 95 ''; 75 96 76 97 # https://github.com/oracle/oci-cli/issues/187