aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/completions/open.fish
diff options
context:
space:
mode:
authorGravatar lordlycastle <lordlycastle@hotmail.com>2015-12-10 14:20:46 +0000
committerGravatar lordlycastle <lordlycastle@hotmail.com>2015-12-10 14:20:46 +0000
commit96b3e1ce1bf8098d4b58b8695b1c2f5d7ba87f29 (patch)
treebcd52051b77c9d65a270a98a89502cbea4a6dc78 /share/completions/open.fish
parent3868203c76e7570b59feeb9d69d5c98b0cd2c7c5 (diff)
Added OS X completions for open, and seq. Added missing stdout redirection to /dev/null when checking command's version.
Diffstat (limited to 'share/completions/open.fish')
-rw-r--r--share/completions/open.fish14
1 files changed, 14 insertions, 0 deletions
diff --git a/share/completions/open.fish b/share/completions/open.fish
new file mode 100644
index 00000000..c81e5170
--- /dev/null
+++ b/share/completions/open.fish
@@ -0,0 +1,14 @@
+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 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'
+ complete -c open -s f -d 'Open STDIN/PIPE with default text editor. End input with C-d.'
+ complete -c open -s F -d 'Don\'t restore previous application windows. Except Untitled documents.'
+ complete -c open -s W -d 'Wait until APP has exited'
+ complete -c open -s R -d 'Reveal FILE(s) in Finder'
+ complete -c open -s n -d 'Open new instace of APP'
+ complete -c open -s g -d 'Open in background'
+ complete -c open -s h -d 'Finds and opens for a header whose name matches the given string. Better performance with full names i.e. NSView.h' -r
+ complete -c open -l args -d 'Pass arguments to opened APP in the argv parameter to main()' -x
+end