aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
authorGravatar Fabian Homborg <FHomborg@gmail.com>2015-12-10 15:32:18 +0100
committerGravatar Fabian Homborg <FHomborg@gmail.com>2015-12-10 15:32:18 +0100
commit2b7ffca41421c6c3551003c6db4ad82c3324c5d3 (patch)
tree70e999be80376a8c487b88f327594ab9b17797f4 /share
parentce719a700c841792e17a6df4804cb389bb7b83de (diff)
parent96b3e1ce1bf8098d4b58b8695b1c2f5d7ba87f29 (diff)
Merge pull request #2595 from lordlycastle/master
Added OS X completions for open, and seq.
Diffstat (limited to 'share')
-rw-r--r--share/completions/cat.fish2
-rw-r--r--share/completions/cp.fish2
-rw-r--r--share/completions/head.fish4
-rw-r--r--share/completions/open.fish14
-rw-r--r--share/completions/seq.fish18
-rw-r--r--share/completions/stat.fish2
-rw-r--r--share/completions/tail.fish1
-rw-r--r--share/completions/touch.fish2
8 files changed, 33 insertions, 12 deletions
diff --git a/share/completions/cat.fish b/share/completions/cat.fish
index b82ac4e0..f6c2d4af 100644
--- a/share/completions/cat.fish
+++ b/share/completions/cat.fish
@@ -1,4 +1,4 @@
-if cat --version ^ /dev/null # GNU
+if cat --version ^ /dev/null > /dev/null # GNU
complete -c cat -s A -l show-all --description "Escape all non-printing characters"
complete -c cat -s b -l number-nonblank --description "Number nonblank lines"
complete -c cat -s e --description "Escape non-printing characters except tab"
diff --git a/share/completions/cp.fish b/share/completions/cp.fish
index ca92194d..ffe920b5 100644
--- a/share/completions/cp.fish
+++ b/share/completions/cp.fish
@@ -1,4 +1,4 @@
-if cp --version ^ /dev/null # GNU
+if cp --version ^ /dev/null > /dev/null # GNU
complete -c cp -s a -l archive --description "Same as -dpR"
complete -c cp -s b -l backup --description "Make backup of each existing destination file" -a "none off numbered t existing nil simple never"
complete -c cp -l copy-contents --description "Copy contents of special files when recursive"
diff --git a/share/completions/head.fish b/share/completions/head.fish
index 6aa0f11b..7e397d6a 100644
--- a/share/completions/head.fish
+++ b/share/completions/head.fish
@@ -6,6 +6,6 @@ if head --version >/dev/null ^/dev/null
complete -f -c head -l version -d 'Display version'
complete -f -c head -l help -d 'Display help'
else # OSX and similar - no longopts (and fewer shortopts)
- complete -c head -s c -d 'Print the first N bytes; Leading '-', truncate the last N bytes' -r
- complete -c head -s n -d 'Print the first N lines; Leading '-', truncate the last N lines' -r
+ complete -c head -s c -d 'Print the first N bytes' -r
+ complete -c head -s n -d 'Print the first N lines' -r
end
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
diff --git a/share/completions/seq.fish b/share/completions/seq.fish
index eaf54761..69760099 100644
--- a/share/completions/seq.fish
+++ b/share/completions/seq.fish
@@ -1,6 +1,12 @@
-
-complete -c seq -s f -l format -d 'Use printf style floating-point FORMAT'
-complete -c seq -s s -l separator -d 'Use STRING to separate numbers'
-complete -c seq -s w -l equal-width -d 'Equalize width with leading zeroes'
-complete -c seq -l help -d 'Display this help'
-complete -c seq -l version -d 'Output version information'
+if seq --version ^ /dev/null > /dev/null #GNU
+ complete -c seq -s f -l format -d 'Use printf style floating-point FORMAT'
+ complete -c seq -s s -l separator -d 'Use STRING to separate numbers'
+ complete -c seq -s w -l equal-width -d 'Equalize width with leading zeroes'
+ complete -c seq -l help -d 'Display this help'
+ complete -c seq -l version -d 'Output version information'
+else #OS X
+ complete -c seq -s f -d 'Use printf style floating-point FORMAT'
+ complete -c seq -s s -d 'Use STRING to separate numbers'
+ complete -c seq -s w -d 'Equalize width with leading zeroes'
+ complete -c seq -s t -d 'Use STRING to terminate sequence of numbers'
+end
diff --git a/share/completions/stat.fish b/share/completions/stat.fish
index 3fc6742b..a87ca02a 100644
--- a/share/completions/stat.fish
+++ b/share/completions/stat.fish
@@ -1,4 +1,4 @@
-if stat --version ^ /dev/null # GNU
+if stat --version ^ /dev/null > /dev/null # GNU
complete -c stat -s L -l dereference -d 'follow links'
complete -c stat -s f -l file-system -d 'display file system status instead of file status'
complete -c stat -s c -l format -x -d 'use the specified FORMAT instead of the default; output a newline after each use of FORMAT'
diff --git a/share/completions/tail.fish b/share/completions/tail.fish
index aa67e784..66c426d6 100644
--- a/share/completions/tail.fish
+++ b/share/completions/tail.fish
@@ -12,6 +12,7 @@ if tail --version > /dev/null ^ /dev/null
complete -c tail -l help -d 'display this help and exit'
complete -c tail -l version -d 'output version information and exit'
else # OSX and similar - no longopts (and fewer shortopts)
+ complete -c tail -s b -x -d 'output last K 512 byte blocks'
complete -c tail -s c -x -d 'output the last K bytes or only K bytes with -r'
complete -c tail -s f -d 'output appended data as the file grows'
complete -c tail -s F -d 'Like -f, but also follow renamed or rotated files'
diff --git a/share/completions/touch.fish b/share/completions/touch.fish
index 62f54f16..96e31ce5 100644
--- a/share/completions/touch.fish
+++ b/share/completions/touch.fish
@@ -1,4 +1,4 @@
-if touch --version ^ /dev/null # GNU
+if touch --version ^ /dev/null > /dev/null # GNU
complete -c touch -s a --description "Change access time"
complete -c touch -s B -l backward -x --description "Set date back"
complete -c touch -s c -l no-create --description "Do not create file"