From bc2634eaafb5b2ee2684d3f0a50eda482bb3a55d Mon Sep 17 00:00:00 2001 From: Shun Sakai Date: Fri, 29 Nov 2019 07:14:30 +0900 Subject: [PATCH] Add lz4 completions Squashed commit of the following: commit 08ea083bf87a613675789937d7f6740daa26fc61 Author: Shun Sakai Date: Thu Nov 28 23:51:35 2019 +0900 Implementation of `lz4cat` completions commit 027adedfeb7bb65ffd46e44b4266df3d98368326 Author: Shun Sakai Date: Thu Nov 28 23:36:12 2019 +0900 Implementation of `unlz4` completions commit 522925450a8076d4a0d3377cd9233abc643bbbf7 Author: Shun Sakai Date: Thu Nov 28 23:19:45 2019 +0900 Implementation of `lz4c` completions commit 298ce5e05e3be2cac774063ed2ee8289ba53cf24 Author: Shun Sakai Date: Thu Nov 28 23:02:52 2019 +0900 Implementation of `lz4` completions --- share/completions/lz4.fish | 41 +++++++++++++++++++++++++++++++++++ share/completions/lz4c.fish | 3 +++ share/completions/lz4cat.fish | 18 +++++++++++++++ share/completions/unlz4.fish | 23 ++++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 share/completions/lz4.fish create mode 100644 share/completions/lz4c.fish create mode 100644 share/completions/lz4cat.fish create mode 100644 share/completions/unlz4.fish diff --git a/share/completions/lz4.fish b/share/completions/lz4.fish new file mode 100644 index 000000000..3bd35ef58 --- /dev/null +++ b/share/completions/lz4.fish @@ -0,0 +1,41 @@ +# Completions for lz4 + +complete -c lz4 -s z -l compress -d "Compress (default)" +complete -c lz4 -s d -l decompress -l uncompress -d "Decompress" -x -a " +( + __fish_complete_suffix .lz4 +) +" + +complete -c lz4 -s t -l test -d "Test the integrity" +complete -c lz4 -l list -d "List information about .lz4 file(s)" + +for level in (seq 1 12) + complete -c lz4 -o $level -d "Set compression level" +end + +complete -c lz4 -l fast -d "Ultra-fast compression" +complete -c lz4 -l best -d "Highest compression, same as -12" +complete -c lz4 -l favor-decSpeed -d "Generate file(s) optimized for decompression speed" +complete -r -c lz4 -s D -d "Use specified file as dictionary" +complete -c lz4 -s f -l force -d "Overwrite without prompting" +complete -c lz4 -s c -l stdout -l to-stdout -d "Force write to stdout" +complete -c lz4 -s m -l multiple -d "Multiple input files" +complete -c lz4 -s r -d "Recurse directories" +complete -c lz4 -o B4 -d "Set block size to 64KB" +complete -c lz4 -o B5 -d "Set block size to 256KB" +complete -c lz4 -o B6 -d "Set block size to 1MB" +complete -c lz4 -o B7 -d "Set block size to 4MB" +complete -c lz4 -o BI -d "Block independence (default)" +complete -c lz4 -o BD -d "Block dependency" +complete -c lz4 -l no-frame-crc -d "Disable frame checksum" +complete -c lz4 -l content-size -d "Header includes original size" +complete -c lz4 -l sparse -d "Enable sparse mode" +complete -c lz4 -l no-sparse -d "Disable sparse mode" +complete -c lz4 -s v -l verbose -d "Be verbose" +complete -c lz4 -s q -l quiet -d "Suppress warnings" +complete -c lz4 -s h -l help -d "Show help" +complete -c lz4 -s H -d "Show long help" +complete -c lz4 -s V -l version -d "Show version" +complete -c lz4 -s k -l keep -d "Keep input file(s) (default)" +complete -c lz4 -l rm -d "Remove input file(s) after de/compression" diff --git a/share/completions/lz4c.fish b/share/completions/lz4c.fish new file mode 100644 index 000000000..9d5eeff61 --- /dev/null +++ b/share/completions/lz4c.fish @@ -0,0 +1,3 @@ +# Completions for lz4c + +complete -c lz4c -w lz4 diff --git a/share/completions/lz4cat.fish b/share/completions/lz4cat.fish new file mode 100644 index 000000000..240b0e367 --- /dev/null +++ b/share/completions/lz4cat.fish @@ -0,0 +1,18 @@ +# Completions for lz4cat + +complete -c lz4cat -x -a " +( + __fish_complete_suffix .lz4 +) +" + +complete -c lz4cat -s t -l test -d "Test the integrity" +complete -c lz4cat -l list -d "List information about .lz4 file(s)" +complete -r -c lz4cat -s D -d "Use specified file as dictionary" +complete -c lz4cat -l sparse -d "Enable sparse mode" +complete -c lz4cat -l no-sparse -d "Disable sparse mode" +complete -c lz4cat -s v -l verbose -d "Be verbose" +complete -c lz4cat -s q -l quiet -d "Suppress warnings" +complete -c lz4cat -s h -l help -d "Show help" +complete -c lz4cat -s H -d "Show long help" +complete -c lz4cat -s V -l version -d "Show version" diff --git a/share/completions/unlz4.fish b/share/completions/unlz4.fish new file mode 100644 index 000000000..a3abe6d07 --- /dev/null +++ b/share/completions/unlz4.fish @@ -0,0 +1,23 @@ +# Completions for unlz4 + +complete -c unlz4 -x -a " +( + __fish_complete_suffix .lz4 +) +" + +complete -c unlz4 -s t -l test -d "Test the integrity" +complete -c unlz4 -l list -d "List information about .lz4 file(s)" +complete -r -c unlz4 -s D -d "Use specified file as dictionary" +complete -c unlz4 -s f -l force -d "Overwrite without prompting" +complete -c unlz4 -s c -l stdout -l to-stdout -d "Force write to stdout" +complete -c unlz4 -s m -l multiple -d "Multiple input files" +complete -c unlz4 -l sparse -d "Enable sparse mode" +complete -c unlz4 -l no-sparse -d "Disable sparse mode" +complete -c unlz4 -s v -l verbose -d "Be verbose" +complete -c unlz4 -s q -l quiet -d "Suppress warnings" +complete -c unlz4 -s h -l help -d "Show help" +complete -c unlz4 -s H -d "Show long help" +complete -c unlz4 -s V -l version -d "Show version" +complete -c unlz4 -s k -l keep -d "Keep input file(s) (default)" +complete -c unlz4 -l rm -d "Remove input file(s) after decompression"