File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ # chflags(1) completion -*- shell-script -*-
2+
3+ _comp_cmd_chflags ()
4+ {
5+ local cur prev words cword comp_args
6+ _comp_initialize -- " $@ " || return
7+
8+ if [[ $cur == -* ]]; then
9+ # Complete -options
10+ local w opts=" "
11+ for w in " ${words[@]} " ; do
12+ [[ $w == -R ]] && opts=" -H -L -P" && break
13+ done
14+ _comp_compgen -- -W ' -f -h -v -R $opts'
15+ else
16+ local ret
17+ # The first argument is a list of flags; the rest are filedir.
18+ _comp_count_args
19+ if (( ret == 1 )) ; then
20+ _comp_delimited , -W ' simmutable nosimmutable sappend nosappend
21+ archived noarchived opaque noopaque nodump
22+ dump uimmutable nouimmutable uappend
23+ nouappend hidden nohidden'
24+ else
25+ _comp_compgen_filedir
26+ fi
27+ fi
28+ } &&
29+ complete -F _comp_cmd_chflags chflags
30+
31+ # ex: filetype=sh
You can’t perform that action at this time.
0 commit comments