Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fzf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
fzf
Commits
fcd89650
Unverified
Commit
fcd89650
authored
4 years ago
by
Junegunn Choi
Browse files
Options
Downloads
Patches
Plain Diff
[vim] fzf#run should ignore empty 'dir' argument
Fix #2343
parent
f55c990e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README-VIM.md
+2
-2
2 additions, 2 deletions
README-VIM.md
plugin/fzf.vim
+2
-2
2 additions, 2 deletions
plugin/fzf.vim
with
4 additions
and
4 deletions
README-VIM.md
+
2
−
2
View file @
fcd89650
...
...
@@ -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.
```
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
))
```
...
...
@@ -372,7 +372,7 @@ a unique name to our command and pass it as the first argument to `fzf#wrap`.
```
vim
" 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.
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
))
```
...
...
This diff is collapsed.
Click to expand it.
plugin/fzf.vim
+
2
−
2
View file @
fcd89650
...
...
@@ -424,10 +424,10 @@ try
throw
v
:
exception
endtry
if
!
has_key
(
dict
,
'dir'
)
if
!
s:present
(
dict
,
'dir'
)
let
dict
.
dir
=
s:fzf_getcwd
()
endif
if
has
(
'win32unix'
)
&&
has_key
(
dict
,
'dir'
)
if
has
(
'win32unix'
)
&&
s:present
(
dict
,
'dir'
)
let
dict
.
dir
=
fnamemodify
(
dict
.
dir
,
':p'
)
endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment