-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathichecks
More file actions
51 lines (46 loc) · 1.46 KB
/
Copy pathichecks
File metadata and controls
51 lines (46 loc) · 1.46 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
45
46
47
48
49
50
#!/bin/bash
#
# Copyright (c) 2020-2025 IAR Systems AB
# See LICENSE for detailed license information
#
# Bash autocompletion for `ichecks`
#
_ichecks()
{
local cur prev words cword split
_init_completion -s -n : || return
case $prev in
--all)
compopt -o nospace
return;;
--default|--package)
COMPREPLY=( $(compgen -W 'stdchecks cert security misrac2004 misrac2012 misrac++2008' -- "${cur}") )
return;;
--group)
COMPREPLY=( $(compgen -W \
'arr ath cast catch comma comment const cop cpu decl \
define enum exp expr fpt func include int itr lib logic \
mem ptr red resource sizeof spc struct switch throw union \
cert-{arr,dcl,env,err,exp,fio,flp,int,mem,msc,pre,sig,str} \
sec-{buffer,div-0,fileop,injection,loop,null,string} \
misrac2012-dir-4
misrac2012-rule-{1,2,3,{5..23}} \
misrac2004-{1,2,{5..20}} \
misrac++2008-{0-{1,2,3},2-{7,10,13},3-{1,9},4-5,5-{0,2,3,8,14,18,19}} \
misrac++2008-{6-{2..6},7-{1,2,4,5},8-{0,4,5},9-{3,5,6}} \
misrac++2008-{12-1,15-{1,3,5},16-{0,2,3},17-0,18-{0,2,4,7}} \
misrac++2008-{19-3,27-0}' -- "${cur}") )
return;;
--output)
_filedir
return;;
esac
${split} && return
case ${cur} in
-*)
COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "${cur}") )
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
return;;
esac
}
complete -o nosort -F _ichecks ichecks