Source File
snippet.go
Belonging Package
github.com/rsteube/carapace/internal/shell/bash_ble
// Package bash_ble provides bash-ble completionpackage bash_bleimport ()// Snippet creates the bash-ble completion script.func ( *cobra.Command) string {:= bash.Snippet()= regexp.MustCompile("complete -F [^\n]+").ReplaceAllString(, ""):= fmt.Sprintf(`_%v_completion_ble() {if [[ ${BLE_ATTACHED-} ]]; then[[ :$comp_type: == *:auto:* ]] && returncompopt -o ble/no-defaultbleopt complete_menu_style=desclocal compline="${COMP_LINE:0:${COMP_POINT}}"local IFS=$'\n'local cmapfile -t c < <(echo "$compline" | sed -e "s/ \$/ ''/" -e 's/"/\"/g' | xargs %v _carapace bash-ble)[[ "${c[*]}" == "" ]] && c=() # fix for mapfile creating a non-empty array from empty command outputlocal candfor cand in "${c[@]}"; do[ ! -z "$cand" ] && ble/complete/cand/yield mandb "${cand%%$'\t'*}" "${cand##*$'\t'}"doneelsecomplete -F _%v_completion %vfi}complete -F _%v_completion_ble %v`, .Name(), uid.Executable(), .Name(), .Name(), .Name(), .Name())return +}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |