fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Joost-Wim Boekesteijnffprobe completions: show_stream -> show_streams0cec12c6c

master
4.6 KiB78 linesraw
1function __fish_ffprobe_help_type
2    printf '%s\t%s\n' long "Print more options"
3    printf '%s\t%s\n' full "Print all options"
4
5    for help_type in decoder encoder demuxer muxer filter
6        set -l regex
7
8        if test $help_type = filter
9            set regex '\S+\s+(\S+)\s+\S+\s+(\S+)'
10        else
11            set regex '\S+\s+(\S+)\s+(\S+)'
12        end
13
14        printf '%s\n' $help_type=(ffprobe -loglevel quiet -"$help_type"s | string trim | string match -rv '=|:$|^-' | string replace -rf "$regex" '$1\t$2')
15    end
16end
17
18# Main options
19complete -c ffprobe -s L -d "Show license"
20complete -x -c ffprobe -s h -s "?" -o help -l help -a "(__fish_ffprobe_help_type)" -d "Show help"
21complete -c ffprobe -o version -d "Show version"
22complete -c ffprobe -o buildconf -d "Show build configuration"
23complete -c ffprobe -o formats -d "Show available formats"
24complete -c ffprobe -o muxers -d "Show available muxers"
25complete -c ffprobe -o demuxers -d "Show available demuxers"
26complete -c ffprobe -o devices -d "Show available devices"
27complete -c ffprobe -o codecs -d "Show available codecs"
28complete -c ffprobe -o decoders -d "Show available decoders"
29complete -c ffprobe -o encoders -d "Show available encoders"
30complete -c ffprobe -o bsfs -d "Show available bit stream filters"
31complete -c ffprobe -o protocols -d "Show available protocols"
32complete -c ffprobe -o filters -d "Show available filters"
33complete -c ffprobe -o pix_fmts -d "Show available pixel formats"
34complete -c ffprobe -o layouts -d "Show standard channel layouts"
35complete -c ffprobe -o sample_fmts -d "Show available audio sample formats"
36complete -c ffprobe -o colors -d "Show available color names"
37complete -x -c ffprobe -o loglevel -s v -a "quiet panic fatal error warning info verbose debug trace" -d "Set logging level"
38complete -c ffprobe -o report -d "Generate a report"
39complete -c ffprobe -o max_alloc -d "Set maximum size of a single allocated block"
40complete -c ffprobe -o cpuflags -d "Force specific cpu flags"
41complete -c ffprobe -o hide_banner -d "Do not show program banner"
42complete -c ffprobe -o sources -d "List sources of the input device"
43complete -c ffprobe -o sinks -d "List sinks of the output device"
44complete -c ffprobe -s f -d "Force format"
45complete -c ffprobe -o unit -d "Show unit of the displayed values"
46complete -c ffprobe -o prefix -d "Use SI prefixes for the displayed values"
47complete -c ffprobe -o byte_binary_prefix -d "Use binary prefixes for byte units"
48complete -c ffprobe -o sexagesimal -d "Use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units"
49complete -c ffprobe -o pretty -d "Prettify the format of displayed values, make it more human readable"
50complete -x -c ffprobe -o print_format -a "default compact csv flat ini json xml" -d "Set the output printing format"
51complete -x -c ffprobe -o of -a "default compact csv flat ini json xml" -d "Alias for -print_format"
52complete -c ffprobe -o select_streams -d "Select the specified streams"
53complete -c ffprobe -o sections -d "Print sections structure and section information, and exit"
54complete -c ffprobe -o show_data -d "Show packets data"
55complete -c ffprobe -o show_data_hash -d "Show packets data hash"
56complete -c ffprobe -o show_error -d "Show probing error"
57complete -c ffprobe -o show_format -d "Show format/container info"
58complete -c ffprobe -o show_frames -d "Show frames info"
59complete -c ffprobe -o show_format_entry -d "Show a particular entry from the format/container info"
60complete -c ffprobe -o show_entries -d "Show a set of specified entries"
61complete -c ffprobe -o show_log -d "Show log"
62complete -c ffprobe -o show_packets -d "Show packets info"
63complete -c ffprobe -o show_programs -d "Show programs info"
64complete -c ffprobe -o show_streams -d "Show streams info"
65complete -c ffprobe -o show_chapters -d "Show chapters info"
66complete -c ffprobe -o count_frames -d "Count the number of frames per stream"
67complete -c ffprobe -o count_packets -d "Count the number of packets per stream"
68complete -c ffprobe -o show_program_version -d "Show ffprobe version"
69complete -c ffprobe -o show_library_versions -d "Show library versions"
70complete -c ffprobe -o show_versions -d "Show program and library versions"
71complete -c ffprobe -o show_pixel_formats -d "Show pixel format descriptions"
72complete -c ffprobe -o show_private_data -d "Show private data"
73complete -c ffprobe -o private -d "Same as show_private_data"
74complete -c ffprobe -o bitexact -d "Force bitexact output"
75complete -c ffprobe -o read_intervals -d "Set read intervals"
76complete -c ffprobe -o default -d "Generic catch all option"
77complete -c ffprobe -s i -d "Read specified file"
78complete -c ffprobe -o find_stream_info -d "Read and decode the streams to fill missing information with heuristics"