Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g:vrc_curl_opts issue #63

Open
pinggit opened this issue Jun 6, 2018 · 3 comments
Open

g:vrc_curl_opts issue #63

pinggit opened this issue Jun 6, 2018 · 3 comments

Comments

@pinggit
Copy link

pinggit commented Jun 6, 2018

I found this is still buggy.

so say I put this in .vimrc:

let g:vrc_show_command = 1

let g:vrc_curl_opts = {
  \ '-sS': '',
  \ '--connect-timeout': 10,
  \ '-i': '',
  \ '--max-time': 60,
  \ '-k': '',
\}

then in my file I have:

 http://localhost:8095                                            
 -u admin:abc
 #GET /virtual-network/5e5f3cf7-b1aa-4b91-976e-23350916ccf7       
 GET /    

the curl got executed is this:

|| curl -sS -k --get 'http://localhost:8095/'

so it still miss the -u "admin:abc".

as long as I comment out the "let g:vrc_curl_opts" setting in .vimrc, it works.

so it looks let g:vrc_curl_opts does not work for me.

@diepm
Copy link
Owner

diepm commented Jun 7, 2018

Might be related to Vim 7.4? I've tried it with Vim 8, and the command looks correct.

curl --max-time '60' -H 'Content-Type: application/json' -u 'hello:world' -sS --connect-timeout '10' -i -k --get 'http://localhost:9200/testindex/_search'

Let me try with Vim 7.4.

@diepm
Copy link
Owner

diepm commented Jun 7, 2018

What is the output if you :echo g:vrc_curl_opts?

@diepm
Copy link
Owner

diepm commented Jun 7, 2018

I really have no idea what's going on but I've tried with Vim 7.4 on Mac, and all looks good on my side. I've also tried with Vim 8 on Debian and everything is fine. Unfortunately I don't have access to Vim 7.4 on Debian Stretch. The edge scenario here is probably Vim 7.4 on Debian.

Some info of Vim 7.4 on Mac.

.vimrc

let g:vrc_show_command = 1
let g:vrc_curl_opts = {
  \ '-sS': '',
  \ '--connect-timeout': 10,
  \ '-i': '',
  \ '--max-time': 60,
  \ '-k': '',
\}

Request block

http://localhost:9200
-u hello:world
GET /testindex/_search

Executed command

|| curl --max-time '60' -H 'Content-Type: application/json' -u 'hello:world' -sS --connect-timeout '10' -i -k --get 'http://localhost:9200/testindex/_search'

*Vim version info

:ver
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 22 2018 07:34:24)
MacOS X (unix) version
Included patches: 1-2367
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl             +cmdline_compl   +digraphs        +folding         +langmap         -mouseshape      -mzscheme        +python3         +syntax          -toolbar         +writebackup
+arabic          +cmdline_hist    -dnd             -footer          +libcall         +mouse_dec       +netbeans_intg   +quickfix        +tag_binary      +user_commands   -X11
+autocmd         +cmdline_info    -ebcdic          +fork()          +linebreak       -mouse_gpm       +num64           +reltime         +tag_old_static  +vertsplit       -xfontset
-balloon_eval    +comments        +emacs_tags      -gettext         +lispindent      -mouse_jsbterm   +packages        +rightleft       -tag_any_white   +virtualedit     -xim
-browse          +conceal         +eval            -hangul_input    +listcmds        +mouse_netterm   +path_extra      +ruby            -tcl             +visual          -xpm
++builtin_terms  +cryptv          +ex_extra        +iconv           +localmap        +mouse_sgr       +perl            +scrollbind      +termguicolors   +visualextra     -xsmp
+byte_offset     +cscope          +extra_search    +insert_expand   -lua             -mouse_sysmouse  +persistent_undo +signs           +terminfo        +viminfo         -xterm_clipboard
+channel         +cursorbind      +farsi           +job             +menu            +mouse_urxvt     +postscript      +smartindent     +termresponse    +vreplace        -xterm_save
+cindent         +cursorshape     +file_in_path    +jumplist        +mksession       +mouse_xterm     +printer         +startuptime     +textobjects     +wildignore
-clientserver    +dialog_con      +find_in_path    +keymap          +modify_fname    +multi_byte      +profile         +statusline      +timers          +wildmenu
+clipboard       +diff            +float           +lambda          +mouse           +multi_lang      -python          -sun_workshop    +title           +windows
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang   -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib  -L/usr/local/lib -o vim        -lncurses -liconv -fra
mework Cocoa   -mmacosx-version-min=10.12 -fstack-protector-strong -L/usr/local/lib  -L/usr/local/Cellar/perl/5.26.2/lib/perl5/5.26.2/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc  -L/usr/lo
cal/opt/python/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin -lpython3.6m -framework CoreFoundation  -lruby.2.5.1 -lobjc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants