summary refs log tree commit diff
path: root/Completion/Base/_value
blob: e29c90e79044a93d066dadeed310e660e8bce23b (plain) (blame)
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
#compdef -value-

_value () {
  #_view_completion_parameters
  if (( $+functions[_value:$compstate[parameter]] )); then
    "_value:$compstate[parameter]" "$@"
  else
    _default
  fi
}

_value:CPPFLAGS () {
  compset -q
  if compset -P '-I'; then
    _files -/ "$@"
  else
    _default "$@"
  fi
}

_value:LDFLAGS () {
  compset -q
  if compset -P '-L'; then
    _files -/ "$@"
  elif compset -P '-R'; then
    compset -P '*:'
    _files -/ -S/ -r ' :' "$@"
  else
    _default "$@"
  fi
}