Re: [vim/vim] runtime(zip)!: Customizable zip/unzip commands (PR #20832)
curbe454 (Vim Github Repository) <[email protected]>
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <vim/vim/pull/20832/[email protected]> |
curbe454 left a comment (vim/vim#20832)
As for my above example:
```vim
let g:zip_browse= ["printf", "'';",
\ "7zlbaf() { 7z l -ba \"$@\" | awk '{print ($3 ~ /D[^[:space:]]{4}/ ? $6 \"/\" : $6)}'; }",
\ " && ", "7zlbaf"]
```
This hack is not good since one more meanless command is executed. There's another example (on Windows):
```vim
let g:zip_browse = ["7zlbaf"]
let g:zip_read = ["7z", "x", "-so"]
let g:zip_extract = ["7z", "x"]
let g:zip_delete = ["7z", "d"]
let g:zip_update = ["7z", "u"]
```
while the `7zlbaf.bat` is a custom script file which is added to `%PATH%`(or `$Env:Path`), with `awk` installed:
```bat
@7z l -ba %* | awk.exe "{ gsub(/\\/, \""/\"", $6); print ($3 ~ /D[^[:space:]]{4}/ ? $6 \""/\"" : $6)}"
```
They are still not elegant. Maybe we should provide an API to let users to format the outputs of commands.
--
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/20832#issuecomment-5082953230
You are receiving this because you are subscribed to this thread.
Message ID: <vim/vim/pull/20832/[email protected]>
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/20832/c5082953230%40github.com.