fork/fish-shell

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

Fabian Weisshaaradd mdutil completion313cb0d24

master
1.1 KiB24 linesraw
1# completion for mdutil (macOS)
2
3function __fish_mdutil_volumes
4    command mdutil -a -s | while read -l line
5        if string match -q \t"*" -- $line
6            printf "%s\n" $line
7        else
8            # Use printf to not output a newline so indented lines are joined
9            # to non-indented ones
10            printf "%s" (string replace -r ':$' '' -- $line)
11        end
12    end
13end
14
15complete -c mdutil -s p -f -d 'Publish metadata'
16complete -c mdutil -s i -f -a 'on off' -d 'Turn indexing on or off'
17complete -c mdutil -s d -f -d 'Disable Spotlight activity for volume'
18complete -c mdutil -s E -f -d 'Erase and rebuild index'
19complete -c mdutil -s s -f -d 'Print indexing status'
20complete -c mdutil -s t -x -a '(__fish_mdutil_volumes)' -d 'Resolve files from file id with an optional volume path or device id'
21complete -c mdutil -s a -f -d 'Apply command to all volumes'
22complete -c mdutil -s V -x -a '(__fish_mdutil_volumes)' -d 'Apply command to all stores on the specified volume'
23complete -c mdutil -s v -f -d 'Display verbose information'
24complete -c mdutil -x -a '(__fish_mdutil_volumes)'