Source File
snippet.go
Belonging Package
github.com/carapace-sh/carapace/internal/shell/oil
// Package oil provides Oil completionpackage oilimport ()// Snippet creates the oil completion script.func ( *cobra.Command) string {:= fmt.Sprintf(`#!/bin/osh_%v_completion() {local compline="${COMP_LINE:0:${COMP_POINT}}"local IFS=$'\n'mapfile -t COMPREPLY < <(echo "$compline" | sed -e "s/ \$/ ''/" -e 's/"/\"/g' | xargs %v _carapace oil)[[ "${COMPREPLY[@]}" == "" ]] && COMPREPLY=() # fix for mapfile creating a non-empty array from empty command output[[ ${COMPREPLY[0]} == *[/=@:.,$'\001'] ]] && compopt -o nospace# TODO use mapfile# shellcheck disable=SC2206[[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=(${COMPREPLY[@]%%$'\001'})}complete -F _%v_completion %v`, .Name(), uid.Executable(), .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. |