Comments (31)
fish doesn't support $(...)
... mother of god why...
from fzf.kak.
Hm. That's weird, because I shouldn't fail if no highlighter is installed. Because it fallbacks to cat
. I have no highlighter in my Termux instance, and it works fine there, though inside tmux. I'll investigate it
from fzf.kak.
@TeddyDD does fzf-buffer
work? It uses different implementation. If It isn't working too, there's nothing to do with preview. Also please check fzf-cd
from fzf.kak.
buffer and cd works. I checked if this might be terminal related but both kitty and xst gives me the same result
from fzf.kak.
I've found the issue. Please try with latest master
from fzf.kak.
No. Actually not. The problem is that the size calculation isn't happening.
from fzf.kak.
I've pushed modified version, in which $pos
variable contains default value. Please try to launch fzf with it
from fzf.kak.
I've pushed fix_preview
branch, can you please try it? It works in my setup, I even symlinked sh to dash. Though It worked for me whole time, so my configuration can't be referenced.
from fzf.kak.
It doesn't close terminal window so you probably fixed it :)
Problem is apparently fzf uses $SHELL
in preview command so preview it's broken on Fish shell. I fixed it with this patch
diff --git i/rc/fzf.kak w/rc/fzf.kak
index a038c9..ec160c 100644
--- i/rc/fzf.kak
+++ w/rc/fzf.kak
@@ -334,7 +334,7 @@ define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{
elif [ ! -z "${kak_opt_termcmd}" ]; then
path=$(pwd)
additional_flags=$(echo $additional_flags | sed "s:\$pos:\\\\\$pos:")
- cmd="$kak_opt_termcmd \"sh -c \\\"cd $path && $preview_pos $items_command | fzf --expect ctrl-q $additional_flags > $tmp\\\"\""
+ cmd="$kak_opt_termcmd \"sh -c \\\"SHELL=/bin/sh; export SHELL; cd $path && $preview_pos $items_command | fzf --expect ctrl-q $additional_flags > $tmp\\\"\""
else
echo "fail termcmd option is not set"
exit
Not sure if this patch is correct way to do this, but after applying it, it works for me.
from fzf.kak.
/bin/sh
is not always there. For example in Termux there's no /bin/sh
from fzf.kak.
@TeddyDD can you please try the latest fix_preview
branch?
from fzf.kak.
It doesn't work, terminal shows up for split of a second and closes.
from fzf.kak.
Weird. It works for me. I suspect that we have single thing that doesn't work on your setup and works on my. I'll try to use fish
from fzf.kak.
I tried to run Kakoune with bash and sh on fix_preview branch. I'm getting
invalid preview window layout:
for a second and terminal closes
from fzf.kak.
Thats exactly what I've been fixing all the time, and strangely enough it works for me
from fzf.kak.
yeah, but that shoudn't matter since Kakoune uses posix shell in expansions, right?
from fzf.kak.
yeah, but I pass shell command to terminal via $termcmd -e
, then I pass it to sh -c
to actually do the thing. This way it should be more portable, since we always use sh
. Now I try to debug this 3 screen line command in fish, and the syntax is wrong in the places where I least expect it to be.
from fzf.kak.
@TeddyDD with latest changes, still doesn't work?
from fzf.kak.
um, you haven't pushed anything new to fix_preview
from fzf.kak.
Oh. Sorry. I didn't noticed that my connection was off. I've pushed the changes
from fzf.kak.
nope, still blinking terminal
from fzf.kak.
Can I ask you to try with another login shell? Althoughit works for me in KDE and Mate, with bash, zsh, and fish as a login shells...
from fzf.kak.
sure, I'll try and report back
from fzf.kak.
I've installed kitty, and now it isn't working for me too. I'm testing this mainly with termite. So I thought that other terminals should work. Turns out that that's not always true. Mate terminal brokes too.
from fzf.kak.
I tried with bash as login shell, it doesn't help. I tried it under st and kitty
from fzf.kak.
I've noticed that this doesn't work with kitty, and alacritty when they set as termcmd
. If I change it, it works. Try changing termcmd
to some common terminal, like gnome terminal? Maybe it is the issue with kitty, as it need some additional argument. Currently, setting termcmd
to termite -e
gnome-terminal -e
and mate-terminal -e
makes it work.
from fzf.kak.
I see.
when alacritty installed termcmd
equals to alacritty -e sh -c
when kitty installed termcmd
equals to kitty sh -c
I use termite, and with it termcmd
equals to termite -e
Seems likse -e
isn't compatible with sh -c
in some ways.
from fzf.kak.
Ok now I know where to dig. Expect a fix in couple of hours :)
from fzf.kak.
@TeddyDD should work now. I've tested with all possible at the moment terminals
from fzf.kak.
it works, awesome job!
from fzf.kak.
awesome job
issue solved exactly in 30 comments.
I'll merge this into master now
from fzf.kak.
Related Issues (20)
- [Feature Request] Preview support for grep HOT 2
- Cannot open fzf file picker with the `fzf_terminal_command` in Kitty HOT 6
- Please add documentation on fzf-grep/file modules HOT 2
- FZF tmux window is shown in wrong tmux session HOT 2
- [Feature Request] Show relative paths in fzf-vcs HOT 3
- I can't make the grep and find commands ignore all the files that are in the gitignore. HOT 2
- I can't ignore the files in gitignore. HOT 1
- [Question] How to use with skim interactive mode HOT 2
- [Question] Use with connect-fzf HOT 5
- fzf_preview_tmux_height not working HOT 4
- Main selection ignored in fzf search HOT 5
- fzf opens and closes immediately HOT 5
- [Help] I can't set up the find command correctly HOT 5
- kak_client_env_TMUX erroring out when calling fzf-ctags HOT 1
- Grep with skim inserts characters and messes with buffers HOT 6
- [Feature Request] Configurable kak-cmd HOT 1
- doesnโt work HOT 3
- Can't setup fzf via kakrc HOT 4
- [Feature Request] Order buffers according to which has been last used HOT 4
- Setting flags for fzf_grep_command is impossible HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fzf.kak.