Skip to content

Commit 7748282

Browse files
committed
7z: add some TODO notes on parsing "i" output for extensions
1 parent 73d8304 commit 7748282

File tree

1 file changed

+8
-0
lines changed
  • completions

1 file changed

+8
-0
lines changed

completions/7z

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ _7z()
9595
_count_args =
9696
if [[ $args -eq 2 ]]; then
9797
_filedir_xspec unzip
98+
# TODO: parsing 7z i output?
99+
# - how to figure out if the format is input or output?
100+
# - find string Formats:, read until next empty line
101+
# - extensions start from column 26
102+
# - ignore everything in parens
103+
# - terminate on two spaces
104+
# - terminate on token containing anything [^a-z0-9]
105+
# (assumption: extensions are all lowercase)
98106
[[ $mode == w ]] &&
99107
_filedir '@(7z|bz2|swf|?(g)tar|?(t)[bglx]z|tb?(z)2|wim)' ||
100108
_filedir '@(7z|arj|bz2|cab|chm|cpio|deb|dmg|flv|gem|img|iso|lz[ah]|lzma?(86)|msi|pmd|[rx]ar|rpm|sw[fm]|?(g)tar|taz|?(t)[bglx]z|tb?(z)2|vhd|wim|Z)'

0 commit comments

Comments
 (0)