Unverified Commit ea0bf085 authored by willian.eth's avatar willian.eth Committed by GitHub

build: fix auto-completion scripts and include them in .deb package (#25195)

Co-authored-by: 's avatarFelix Lange <fjl@twurst.com>
parent d12b1a91
#! /bin/bash _geth_bash_autocomplete() {
: ${PROG:=$(basename ${BASH_SOURCE})}
_cli_bash_autocomplete() {
if [[ "${COMP_WORDS[0]}" != "source" ]]; then if [[ "${COMP_WORDS[0]}" != "source" ]]; then
local cur opts base local cur opts base
COMPREPLY=() COMPREPLY=()
...@@ -17,5 +13,4 @@ _cli_bash_autocomplete() { ...@@ -17,5 +13,4 @@ _cli_bash_autocomplete() {
fi fi
} }
complete -o bashdefault -o default -o nospace -F _cli_bash_autocomplete $PROG complete -o bashdefault -o default -o nospace -F _geth_bash_autocomplete geth
unset PROG
#compdef $PROG _geth_zsh_autocomplete() {
_cli_zsh_autocomplete() {
local -a opts local -a opts
local cur local cur
cur=${words[-1]} cur=${words[-1]}
...@@ -17,4 +15,4 @@ _cli_zsh_autocomplete() { ...@@ -17,4 +15,4 @@ _cli_zsh_autocomplete() {
fi fi
} }
compdef _cli_zsh_autocomplete $PROG compdef _geth_zsh_autocomplete geth
build/bin/{{.BinaryName}} usr/bin build/bin/{{.BinaryName}} usr/bin
{{- if eq .BinaryName "geth" }}
build/deb/ethereum/completions/bash_autocomplete etc/bash_completion.d/geth
build/deb/ethereum/completions/zsh_autocomplete usr/share/zsh/vendor-completions/_geth
{{end -}}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment