lalitmetkar / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

:command -complete option affects processing command arguments #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Define a command: `:command -nargs=1 -complete=dir Echo :echo <q-args>`
2. Run it: `:Echo $HOME`

What is the expected output? What do you see instead?

Expected: $HOME (would have seen this if there were no “-complete=dir” 
argument)

Seeing: /home/zyx

What version of the product are you using? On what operating system?

vim-7.3.456

Even if this is intended behavior, I do see its documentation nowhere between 
`:h :command-complete` and `:h command-completion-custom`.

Original issue reported on code.google.com by zyx....@gmail.com on 4 Mar 2012 at 6:07

GoogleCodeExporter commented 9 years ago
Let's just document that behaviour for now:

diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1283,6 +1283,7 @@ completion can be enabled:
        -complete=custom,{func} custom completion, defined via {func}
        -complete=customlist,{func} custom completion, defined via {func}

+Note: That some completion methods might expand environment variables.

 Custom completion                      *:command-completion-custom*
                                        *:command-completion-customlist*

Original comment by chrisbr...@googlemail.com on 30 Sep 2014 at 9:43

GoogleCodeExporter commented 9 years ago
I'll include that change.

Original comment by brammool...@gmail.com on 30 Sep 2014 at 12:59

GoogleCodeExporter commented 9 years ago
Closing, as the documentation has been adjusted.

Original comment by chrisbr...@googlemail.com on 8 Oct 2014 at 3:07