• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2_abidw_module()
3{
4	local cur prev OPTS
5	COMPREPLY=()
6	cur="${COMP_WORDS[COMP_CWORD]}"
7	prev="${COMP_WORDS[COMP_CWORD-1]}"
8	case $prev in
9	  '-d'|'--debug-info-dir')
10	    local IFS=$'\n'
11	    compopt -o dirnames
12	    COMPREPLY=( $(compgen -d -- $cur) )
13	    return 0
14	    ;;
15	  '--check-alternative-debug-info' | '--check-alternative-debug-info-base-name')
16	    # TODO: perhaps limit this to ar-s and elf-s
17	    local IFS=$'\n'
18	    compopt -o filenames
19	    COMPREPLY=( $(compgen -f -- $cur) )
20	    return 0
21	    ;;
22	  '--out-file')
23	    local IFS=$'\n'
24	    compopt -o filenames
25	    COMPREPLY=( $(compgen -f -- $cur) )
26	    return 0
27	    ;;
28	esac
29	case $cur in
30	  -*)
31	    OPTS="  --abidiff
32		    --debug-info-dir
33		    --check-alternative-debug-info
34		    --check-alternative-debug-info-base-name
35		    --help
36		    --load-all-types
37		    --no-architecture
38		    --noout
39		    --out-file
40		    --no-show-locs
41		    --stats"
42	    COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
43	    return 0
44	    ;;
45	esac
46	local IFS=$'\n'
47	compopt -o filenames
48	COMPREPLY=( $(compgen -f -- $cur) )
49	return 0
50}
51complete -F _abidw_module abidw
52