nix-completion.bash (991B)
1 # ble/contrib/integration/nix-completion.bash (C) 2023, akinomyoga 2 3 [[ $- == *i* ]] || return 0 4 5 function ble/contrib/integration:nix-completion/_complete_nix.advice { 6 if [[ ${_ble_attached-} && " ${FUNCNAME[*]} " == *" ble/complete/progcomp/.compgen "* && ${COMP_WORDS[0]-} != *[\'\"\\]* ]]; then 7 local _ble_nix_cmd=${COMP_WORDS[0]-nix} ret 8 ble/function#push "$_ble_nix_cmd" ' 9 local IFS=$_ble_term_IFS 10 local -a args; args=("$@") 11 ble/util/conditional-sync "exec $_ble_nix_cmd \"\${args[@]}\"" \ 12 "! ble/complete/check-cancel <&$_ble_util_fd_stdin" 128 progressive-weight:killall' 13 ble/function#advice/do 14 ble/function#pop "$_ble_nix_cmd" 15 else 16 ble/function#advice/do 17 return 0 18 fi 19 } 20 21 function ble/contrib/integration:nix-completion/adjust { 22 if ble/is-function _complete_nix; then 23 ble/function#advice around _complete_nix ble/contrib/integration:nix-completion/_complete_nix.advice 24 fi 25 } 26 27 ble/contrib/integration:nix-completion/adjust