Repository navigation
Expand file tree
/
Copy pathbash-completion
More file actions
44 lines (42 loc) · 1.82 KB
/
Copy pathbash-completion
File metadata and controls
44 lines (42 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
completions() {
local cur prev
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD - 1]}
case ${COMP_CWORD} in
1)
COMPREPLY=($(compgen -W "install config keys update up start down stop restart version logs cmd terminate prune-nethermind prune-history prune-reth prune-lighthouse prune-besu repair-reth migrate-geth migrate-nethermind migrate-reth resync-execution resync-consensus space port-check attach-geth" -- ${cur}))
;;
2)
case ${prev} in
logs|restart|down|stop)
# Ask Compose for this project's services. "--filter name="
# is an unanchored regex, and it hardcoded the project name.
COMPREPLY=($(compgen -W "$(docker compose ps --services 2>/dev/null)" -- ${cur}))
;;
port-check)
COMPREPLY=($(compgen -W "--troubleshoot --debug" -- ${cur}))
;;
keys)
COMPREPLY=($(compgen -W "list count import delete register create-for-csm get-recipient set-recipient delete-recipient get-gas set-gas delete-gas get-graffiti set-graffiti delete-graffiti get-builder set-builder delete-builder get-api-token create-prysm-wallet get-prysm-wallet get-grandine-wallet prepare-address-change send-address-change sign-exit send-exit" -- ${cur}))
;;
*)
COMPREPLY=()
;;
esac
;;
3)
case ${prev} in
sign-exit)
COMPREPLY=($(compgen -W "0x from-keystore" -- ${cur}) )
;;
*)
COMPREPLY=()
;;
esac
;;
*)
COMPREPLY=()
;;
esac
}
complete -F completions ethd