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
917b1759
Commit
917b1759
authored
9 years ago
by
Junegunn Choi
Browse files
Options
Downloads
Patches
Plain Diff
[fzf-tmux/vim] Fixes for fish (#204)
parent
16ca9c68
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/fzf-tmux
+11
-9
11 additions, 9 deletions
bin/fzf-tmux
plugin/fzf.vim
+6
-0
6 additions, 0 deletions
plugin/fzf.vim
with
17 additions
and
9 deletions
bin/fzf-tmux
+
11
−
9
View file @
917b1759
...
...
@@ -100,13 +100,6 @@ cleanup() {
}
trap
cleanup EXIT SIGINT SIGTERM
# Build arguments to fzf
str
=
""
for
arg
in
"
${
args
[@]
}
"
;
do
str
=
"
$str
\"
${
arg
//\
"/
\\\"
}
\"
"
done
cat <<<
"
$str
"
>
$argsf
fail
()
{
>
&2
echo
"
$1
"
exit
1
...
...
@@ -120,13 +113,22 @@ envs=""
mkfifo
$fifo2
mkfifo
$fifo3
# Build arguments to fzf
opts
=
""
for
arg
in
"
${
args
[@]
}
"
;
do
opts
=
"
$opts
\"
${
arg
//\
"/
\\\"
}
\"
"
done
if [ -n
"
$term
"
-o -t 0 ]; then
cat <<<
"
$fzf
$opts
>
$fifo2
; echo
\$
? >
$fifo3
$close
"
>
$argsf
tmux set-window-option -q synchronize-panes off \;\
split-window
$opt
"
cd
$(
printf
%q
"
$PWD
"
)
;
$envs
"'
bash
-c "
'$fzf'
$(
cat
'$argsf'
)
>
'$fifo2'
;
echo
\$
?
>
'$fifo3'
'"$close"'
"'
$swap
split-window
$opt
"cd
$(
printf
%q
"
$PWD
"
)
;
$envs
bash
$argsf
"
$swap
else
mkfifo
$fifo1
cat <<<
"
$fzf
$opts
<
$fifo1
>
$fifo2
; echo
\$
? >
$fifo3
$close
"
>
$argsf
tmux set-window-option -q synchronize-panes off \;\
split-window
$opt
"
$envs
"'
bash
-c "
'$fzf'
$(
cat
'$argsf'
)
<
'$fifo1'
>
'$fifo2'
;
echo
\$
?
>
'$fifo3'
'"$close"'
"'
$swap
split-window
$opt
"
$envs
bash
$argsf
"
$swap
cat <&0 >
$fifo1
&
fi
cat
$fifo2
...
...
This diff is collapsed.
Click to expand it.
plugin/fzf.vim
+
6
−
0
View file @
917b1759
...
...
@@ -105,6 +105,9 @@ function! s:upgrade(dict)
endfunction
function
!
fzf#run
(...)
abort
try
let
oshell
=
&
shell
set
shell
=
sh
if
has
(
'nvim'
)
&&
bufexists
(
'[FZF]'
)
echohl WarningMsg
echomsg
'FZF is already running!'
...
...
@@ -149,6 +152,9 @@ function! fzf#run(...) abort
finally
call
s:popd
(
dict
)
endtry
finally
let
&
shell
=
oshell
endtry
endfunction
function
!
s:present
(
dict
,
...)
...
...
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