Expand argument to plug#begin (#82)
This commit is contained in:
parent
a9fa8f44e5
commit
a64b156682
2
plug.vim
2
plug.vim
|
@ -84,7 +84,7 @@ let s:loaded = get(s:, 'loaded', {})
|
|||
|
||||
function! plug#begin(...)
|
||||
if a:0 > 0
|
||||
let home = s:path(fnamemodify(a:1, ':p'))
|
||||
let home = s:path(fnamemodify(expand(a:1), ':p'))
|
||||
elseif exists('g:plug_home')
|
||||
let home = s:path(g:plug_home)
|
||||
elseif !empty(&rtp)
|
||||
|
|
|
@ -937,6 +937,11 @@ Execute (Update plugins with U key in visual mode):
|
|||
AssertExpect! '[==]', 1
|
||||
q
|
||||
|
||||
Execute (plug#begin should expand env vars):
|
||||
AssertNotEqual '$HOME/.emacs/plugged', expand('$HOME/.emacs/plugged')
|
||||
call plug#begin('$HOME/.emacs/plugged')
|
||||
AssertEqual expand('$HOME/.emacs/plugged'), g:plug_home
|
||||
|
||||
Execute (Cleanup):
|
||||
silent! call system('rm -rf '.temp_plugged)
|
||||
silent! call rename('fzf', 'fzf-staged')
|
||||
|
|
Loading…
Reference in New Issue
Block a user