Skip to content

Commit

Permalink
Change to every functions return some values
Browse files Browse the repository at this point in the history
  • Loading branch information
moznion committed Mar 21, 2013
1 parent 9487a47 commit 1551a54
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions plugin/plenv.vim
Expand Up @@ -28,16 +28,19 @@ func! g:plenv(commands)
" Use defined functions
if exists('*g:plenv_' . a:commands[0])
try
echo function('g:plenv_' . a:commands[0])(a:commands[1])
let l:ret_msg = function('g:plenv_' . a:commands[0])(a:commands[1])
catch
echo function('g:plenv_' . a:commands[0])()
let l:ret_msg = function('g:plenv_' . a:commands[0])()
endtry
return
echo l:ret_msg
return l:ret_msg
endif

" Execute plenv command with some args
let l:command = remove(a:commands, 0)
echo system('plenv ' . l:command . ' ' . s:_serialize_args(a:commands))
let l:ret_msg = system('plenv ' . l:command . ' ' . s:_serialize_args(a:commands))
echo l:ret_msg
return l:ret_msg
endf

func! g:plenv_list()
Expand Down

0 comments on commit 1551a54

Please sign in to comment.