mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-29 16:57:40 +03:00
Merge pull request #292467 from maxbrunet/feat/oci-cli/completion
oci-cli: install shell completion
This commit is contained in:
commit
eaa7f097ba
@ -2,6 +2,7 @@
|
||||
, fetchFromGitHub
|
||||
, fetchPypi
|
||||
, python3
|
||||
, installShellFiles
|
||||
}:
|
||||
|
||||
let
|
||||
@ -46,6 +47,8 @@ buildPythonApplication rec {
|
||||
hash = "sha256-yooEZuSIw2EMJVyT/Z/x4hJi8a1F674CtsMMGkMAYLg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
arrow
|
||||
certifi
|
||||
@ -73,6 +76,24 @@ buildPythonApplication rec {
|
||||
--replace "oci==2.78.0" "oci"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
cat >oci.zsh <<EOF
|
||||
#compdef oci
|
||||
zmodload -i zsh/parameter
|
||||
autoload -U +X bashcompinit && bashcompinit
|
||||
if ! (( $+functions[compdef] )) ; then
|
||||
autoload -U +X compinit && compinit
|
||||
fi
|
||||
|
||||
EOF
|
||||
cat src/oci_cli/bin/oci_autocomplete.sh >>oci.zsh
|
||||
|
||||
installShellCompletion \
|
||||
--cmd oci \
|
||||
--bash src/oci_cli/bin/oci_autocomplete.sh \
|
||||
--zsh oci.zsh
|
||||
'';
|
||||
|
||||
# https://github.com/oracle/oci-cli/issues/187
|
||||
doCheck = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user