Closed tmpm697 closed 2 months ago
You could try using the reverse
ANSI attribute.
man fzf | less --pattern "ANSI ATTRIBUTES"
fzf --prompt " LOCATION " --color "prompt:magenta:reverse"
The problem is that the trailing space is not colored in magenta.
Instead of a normal space, try it with a non-breaking space.
On macOS, the key combination seems to be Option + Space [^1].
Character | Unicode |
---|---|
Space | U+0020 |
Non-Breaking Space | U+00A0 |
[^1]: Non-breaking space: how to insert one? - Apple Community
but then how can i remove that pink
<
in prompt --> it seems padded to STR
in --prompt=STR
another issue is that how can i change the color of text LOCATION
from black to white?
ty
but then how can i remove that pink
<
in prompt --> it seems padded toSTR
in--prompt=STR
--info=hidden
or --info=inline:
might suffice
man fzf | less --pattern "--info=STYLE"
another issue is that how can i change the color of text LOCATION from black to white?
🧐 I don't know.
If the color options provided by fzf
for the prompt are inadequate, you could try workarounds:
$'
[^1][^2][^3]fzf --prompt $'\e[1;37;45m LOCATION \e[0m '
The builtin print
command coupled with the -P
flag allows to use PROMPT SEQUENCES
, see the zshmisc
man page for more.
man zshmisc | less --pattern "PROMPT SEQUENCES"
fzf --prompt "$(print -P -- "%K{164}%B LOCATION %~ %b%k ")"
term | description |
---|---|
%K{numeric\|string} |
Start using a background color |
%B |
Start bold |
%~ |
Current working directory |
%b |
End bold |
%k |
End using background color |
[^1]: Bash Reference Manual - ANSI-C Quoting [^2]: bash quotes (wizardzines.com) [^3]: bash:tip_colors_and_formatting - FLOZz' MISC
u always amazed me with such a detailed thoughtful reply :)
Checklist
man fzf
)Output of
fzf --version
0.51.0
OS
Shell
Problem / Steps to reproduce
from this: https://minsw.github.io/fzf-color-picker/
bg
changes background color of all, but i want specific color of an element instead of globally wideis there a way to do that?
smth like this:![Screenshot 2024-05-07 at 1 03 08 AM](https://github.com/junegunn/fzf/assets/48467427/5ba47171-6e57-48be-a7ee-73689133e729)