fork/fish-shell

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

Austin ZieglerFix `open` completion for macOSbb6160bae

master
1.1 KiB14 linesraw
1if test (uname) = Darwin # OS X
2    complete -c open -s a -d 'specify app name' -r -a "(mdfind -onlyin /Applications -onlyin ~/Applications -onlyin /System/Applications -onlyin /Developer/Applications 'kMDItemContentType==com.apple.application-*' | string replace -r '.+/(.+).app' '\$1')"
3    complete -c open -s b -d 'specify app bundle id' -x -a "(mdls (mdfind -onlyin /Applications -onlyin ~/Applications -onlyin /System/Applications -onlyin /Developer/Applications 'kMDItemContentType==com.apple.application-*') -name kMDItemCFBundleIdentifier | string replace -rf 'kMDItemCFBundleIdentifier = \"(.+)\"' '\$1')"
4    complete -c open -s e -d 'open in TextEdit'
5    complete -c open -s t -d 'open in default editor'
6    complete -c open -s f -d 'open stdin with editor'
7    complete -c open -s F -d 'open app with fresh state'
8    complete -c open -s W -d 'wait for app to exit'
9    complete -c open -s R -d 'reveal in Finder'
10    complete -c open -s n -d 'open new instance of app'
11    complete -c open -s g -d 'open app in background'
12    complete -c open -s h -d 'open library header file' -r
13    complete -c open -l args -d 'pass remaining args to app' -x
14end