addet blesh
This commit is contained in:
parent
58205a50b9
commit
8c8d8e9962
302 changed files with 74275 additions and 0 deletions
27
.local/share/blesh/contrib/integration/nix-completion.bash
Normal file
27
.local/share/blesh/contrib/integration/nix-completion.bash
Normal file
|
@ -0,0 +1,27 @@
|
|||
# ble/contrib/integration/nix-completion.bash (C) 2023, akinomyoga
|
||||
|
||||
[[ $- == *i* ]] || return 0
|
||||
|
||||
function ble/contrib/integration:nix-completion/_complete_nix.advice {
|
||||
if [[ ${_ble_attached-} && " ${FUNCNAME[*]} " == *" ble/complete/progcomp/.compgen "* && ${COMP_WORDS[0]-} != *[\'\"\\]* ]]; then
|
||||
local _ble_nix_cmd=${COMP_WORDS[0]-nix} ret
|
||||
ble/function#push "$_ble_nix_cmd" '
|
||||
local IFS=$_ble_term_IFS
|
||||
local -a args; args=("$@")
|
||||
ble/util/conditional-sync "exec $_ble_nix_cmd \"\${args[@]}\"" \
|
||||
"! ble/complete/check-cancel <&$_ble_util_fd_tui_stdin" 128 progressive-weight:killall'
|
||||
ble/function#advice/do
|
||||
ble/function#pop "$_ble_nix_cmd"
|
||||
else
|
||||
ble/function#advice/do
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
function ble/contrib/integration:nix-completion/adjust {
|
||||
if ble/is-function _complete_nix; then
|
||||
ble/function#advice around _complete_nix ble/contrib/integration:nix-completion/_complete_nix.advice
|
||||
fi
|
||||
}
|
||||
|
||||
ble/contrib/integration:nix-completion/adjust
|
Loading…
Add table
Add a link
Reference in a new issue