Blame view

3rdparty/ffmpeg-4.4.4/x264/tools/bash-autocomplete.sh 459 Bytes
f244cbd5   Hu Chunming   ffmpeg支持h264编码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  _x264()
  {
      local path args cur prev
  
      path="${COMP_LINE%%[[:blank:]]*}"
      args="${COMP_LINE:${#path}:$((COMP_POINT-${#path}))}"
      cur="${args##*[[:blank:]=]}"
      prev="$(sed 's/[[:blank:]=]*$//; s/^.*[[:blank:]]//' <<< "${args%%"$cur"}")"
  
      # Expand ~
      printf -v path '%q' "$path" && eval path="${path/#'\~'/'~'}"
  
      COMPREPLY=($("$path" --autocomplete "$prev" "$cur")) && compopt +o default
  } 2>/dev/null
  complete -o default -F _x264 x264