fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
313cb0d24
master
1# completion for mdutil (macOS) 2 3function __fish_mdutil_volumes 4command mdutil -a -s| while read -l line 5if string match -q\t"*" --$line 6printf "%s\n" $line 7else 8# Use printf to not output a newline so indented lines are joined 9# to non-indented ones 10printf "%s" ( string replace -r':$' '' --$line ) 11end 12end 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)'