Fix fish-shell issue #4993 - support pathname completion for open -a command.

This commit is contained in:
Alexander Skwar 2018-05-18 09:24:04 +02:00 committed by David Adam
parent 9ddba0116f
commit e6aacd6167

View file

@ -1,5 +1,5 @@
if test (uname) = 'Darwin' # OS X
complete -c open -s a -d 'Open APP, or open FILE(s), if supplied, with APP' -x -a "(mdfind -onlyin /Applications -onlyin ~/Applications -onlyin /Developer/Applications 'kMDItemKind==Application' | sed -E 's/.+\/(.+)\.app/\1/g')"
complete -c open -s a -d 'Open APP, or open FILE(s), if supplied, with APP' -r -a "(mdfind -onlyin /Applications -onlyin ~/Applications -onlyin /Developer/Applications 'kMDItemKind==Application' | sed -E 's/.+\/(.+)\.app/\1/g')"
complete -c open -s b -d 'Bundle Identifier of APP to open, or to be used to open FILE' -x -a "(mdls (mdfind -onlyin /Applications -onlyin ~/Applications -onlyin /Developer/Applications 'kMDItemKind==Application') -name kMDItemCFBundleIdentifier | sed -E 's/kMDItemCFBundleIdentifier = \"(.+)\"/\1/g')"
complete -c open -s e -d 'Open FILE(s) with /Applications/TextEdit'
complete -c open -s t -d 'Open FILE(s) with default text editor from LaunchServices'