fzf border not visible on Linux TTY
Checklist
- [x] I have read through the manual page (
man fzf) - [x] I have searched through the existing issues
- [x] For bug reports, I have checked if the bug is reproducible in the latest version of fzf
Output of fzf --version
0.65.2
OS
- [x] Linux
- [ ] macOS
- [ ] Windows
- [ ] Etc.
Shell
- [x] bash
- [ ] zsh
- [ ] fish
Problem / Steps to reproduce
When launching fzf on a Linux TTY with TERM=linux, fzf seems not capable of drawing a border around the list of files.
I can reproduce this by:
- booting into a Linux system
- jump to a TTY or not boot into a desktop manager
- run
fzf --margin=1 --border=rounded - see missing border (sometimes "replaced" by the characters which were drawn at the same positions before)
Screenshot of a qemu VM (but I can also reproduce this on actual hardware):
I would try two things
- See if
--no-unicodehelps. - Build the latest binary from the source and check if it fixes the problem. (see 2a92c7d792b45112ab82eef0be2aa11038e6185d)
$ fzf --version 0.65.2 (ab407c46)
$ uname -r 6.12.51_1
I couldn't reproduce the issue.
I can see the straight border lines, but not the rounded corners ╭╮╰╯.
However, I can see the sharp border corners with --border sharp (┌┐└┘).
And --no-unicode works as expected, falling back to ASCII borders just like in desktop environments.
- FYI: I’m also running Linux 6.12.51.
- adding
--no-unicodedoes not change anything, the output still looks the same - When building the newest commit (ab407c46) with Nix, it at least shows an actual border, but the corners do not look rounded compared to executed in a desktop environment:
But also visible in that screenshot is that the margin does not get cleared for some reason (see lower left corner).
- adding
--no-unicodedoes not change anything, the output still looks the same
What was your command with --no-unicode option?
Cause when I used below command on my TTY, --no-unicode works as expected.
fzf --no-unicode --margin 1 --border rounded
But also visible in that screenshot is that the margin does not get cleared for some reason (see lower left corner).
I also confirm this margin issue happens.
I do not remember, but I now used yours and got the same result:
with fzf 0.65.2 as provided by nixpkgs (just in case of a typo, this shows the fzf I ran above from history):
I see, since we're testing this issue almost same condition, except I'm using Void Linux and you are using NixOS. I'm just wondering how other major distros handle this issue.
Why are you using $TERM=linux? This is for non-gui use.
You should be using: xterm (16-colors) or xterm-256color.
What does curl wttr.in show you?
Why are you using
$TERM=linux? This is for non-gui use.
This is the default on NixOS when being on a TTY (i.e. I have not configured this myself). I would say that this is non-gui.
You should be using:
xterm(16-colors) orxterm-256color.
Interestingly, when setting xterm explicitly, I see no borders (but also no invalid characters on its place instead). And when setting xterm-256color explicitly, the borders looks as expected.
What does
curl wttr.inshow you?
The output is colorful and horizontal & vertical arrows are rendered correctly. Only diagonal arrows seem not be rendered correctly.
(I tested this all on a real machine now because I was not able to quickly spin up a VM, hence I cannot provide good screenshots.)