aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-13 19:15:23 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-13 19:15:23 +1200
commit50c456611b35bc026ece645ff95e0aa74e73e88f (patch)
treeeefc0279e85bf5f3ff959afe0fa432630f96dc4a
parentRemove leading and trailing comment lines (diff)
downloaddotfiles-50c456611b35bc026ece645ff95e0aa74e73e88f.tar.gz
dotfiles-50c456611b35bc026ece645ff95e0aa74e73e88f.zip
Refactor mkdir() call
-rw-r--r--vim/vimrc10
1 files changed, 6 insertions, 4 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 39df726f..a3753493 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -242,10 +242,12 @@ augroup END
" candidates, and specify that there must be only one argument, which we'll
" provide as a quoted parameter to the function.
"
-function! s:Establish(path) abort
- let path = expand(a:path)
- if !isdirectory(path) && exists('*mkdir')
- call mkdir(path, 'p', 0700)
+function! s:Establish(name) abort
+ let name = expand(a:name)
+ let path = 'p'
+ let prot = 0700
+ if !isdirectory(name) && exists('*mkdir')
+ call mkdir(name, path, prot)
endif
endfunction
command! -bar -complete=dir -nargs=1 Establish