mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-09-27 04:39:02 +00:00
parent
f55c990e86
commit
fcd896508b
@ -362,7 +362,7 @@ Our `:LS` command will be much more useful if we can pass a directory argument
|
|||||||
to it, so that something like `:LS /tmp` is possible.
|
to it, so that something like `:LS /tmp` is possible.
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
command! -bang -complete=dir -nargs=* LS
|
command! -bang -complete=dir -nargs=? LS
|
||||||
\ call fzf#run(fzf#wrap({'source': 'ls', 'dir': <q-args>}, <bang>0))
|
\ call fzf#run(fzf#wrap({'source': 'ls', 'dir': <q-args>}, <bang>0))
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ a unique name to our command and pass it as the first argument to `fzf#wrap`.
|
|||||||
```vim
|
```vim
|
||||||
" The query history for this command will be stored as 'ls' inside g:fzf_history_dir.
|
" The query history for this command will be stored as 'ls' inside g:fzf_history_dir.
|
||||||
" The name is ignored if g:fzf_history_dir is not defined.
|
" The name is ignored if g:fzf_history_dir is not defined.
|
||||||
command! -bang -complete=dir -nargs=* LS
|
command! -bang -complete=dir -nargs=? LS
|
||||||
\ call fzf#run(fzf#wrap('ls', {'source': 'ls', 'dir': <q-args>}, <bang>0))
|
\ call fzf#run(fzf#wrap('ls', {'source': 'ls', 'dir': <q-args>}, <bang>0))
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -424,10 +424,10 @@ try
|
|||||||
throw v:exception
|
throw v:exception
|
||||||
endtry
|
endtry
|
||||||
|
|
||||||
if !has_key(dict, 'dir')
|
if !s:present(dict, 'dir')
|
||||||
let dict.dir = s:fzf_getcwd()
|
let dict.dir = s:fzf_getcwd()
|
||||||
endif
|
endif
|
||||||
if has('win32unix') && has_key(dict, 'dir')
|
if has('win32unix') && s:present(dict, 'dir')
|
||||||
let dict.dir = fnamemodify(dict.dir, ':p')
|
let dict.dir = fnamemodify(dict.dir, ':p')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user