Comments (4)
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:
ANSI-C Quoting $'
123
fzf --prompt $'\e[1;37;45m LOCATION \e[0m '
![](https://private-user-images.githubusercontent.com/92653266/328480672-dc17b664-2770-4be0-9b4f-8b2a97c0cff4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzNTU1NjYsIm5iZiI6MTcxODM1NTI2NiwicGF0aCI6Ii85MjY1MzI2Ni8zMjg0ODA2NzItZGMxN2I2NjQtMjc3MC00YmUwLTliNGYtOGIyYTk3YzBjZmY0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE0VDA4NTQyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTViOWQzNmExZGQyMWFmNzNiNWFiZDY1NWMyNTI0MzhkZmMwNGQ3Zjc1Yzc4M2QwNjcxOGNkMWY5NmU0OThiMzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.bwSp-GxlyzqYpld80-PzazQaLGSKA8ZZIllTcusPLsk)
ZSH Command
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 |
![](https://private-user-images.githubusercontent.com/92653266/328433882-2a736e55-dfb4-436f-9828-fc8c184673bd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzNTU1NjYsIm5iZiI6MTcxODM1NTI2NiwicGF0aCI6Ii85MjY1MzI2Ni8zMjg0MzM4ODItMmE3MzZlNTUtZGZiNC00MzZmLTk4MjgtZmM4YzE4NDY3M2JkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE0VDA4NTQyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJlYzg2YmY5ZWVmMzE1NGI5NGI2N2JkMjIxMGMwMWZmZGFjZTkxNGIwMzVkOTQzNjAzOTQ2OWZjYWQ1MDc1YzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2hkOR2V1--cPUpHU2vtPgWXJzvoqiE2c5lo5erbzkY8)
Footnotes
from fzf.
u always amazed me with such a detailed thoughtful reply :)
from fzf.
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.
![](https://private-user-images.githubusercontent.com/92653266/328444120-8969e514-07f6-4955-a8a9-c6954f36d359.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzNTU1NjYsIm5iZiI6MTcxODM1NTI2NiwicGF0aCI6Ii85MjY1MzI2Ni8zMjg0NDQxMjAtODk2OWU1MTQtMDdmNi00OTU1LWE4YTktYzY5NTRmMzZkMzU5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE0VDA4NTQyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNmZTE5NjIyYTA1ZjVkMmY0YTdmMzE1ZTA2MDI1OTc4MzdlMzJjMjBiZTEyMzk0OGEzZjE5ZjViZWI2ZGExMDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.p70L8D6NugIxeernNZ-j-C1d3t3n_WTpaQRmmnt76kQ)
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 |
![](https://private-user-images.githubusercontent.com/92653266/328446133-1b63b44b-2fe9-4960-aa7c-a3eacccf73d0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzNTU1NjYsIm5iZiI6MTcxODM1NTI2NiwicGF0aCI6Ii85MjY1MzI2Ni8zMjg0NDYxMzMtMWI2M2I0NGItMmZlOS00OTYwLWFhN2MtYTNlYWNjY2Y3M2QwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE0VDA4NTQyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA2OGFkZjMxNDM5MDlmZTJmYjIxMmMzNmMyMjMzZDY3NDAxNjc1MDJmYWUxNDE3NjlhODhlMTkwZjE4MmM0NDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.-bTsqTprXZ2Y0MQjFeA_fmtfYjpXP4NbiRGYaXN4oJk)
Footnotes
from fzf.
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
from fzf.
Related Issues (20)
- Examine Profile-guided optimization (PGO) HOT 1
- Allow for external shell script in --preview HOT 2
- [Feature Request] History syntax highlighting HOT 4
- Tiebreak parameter of length or end does not produce the expected results HOT 3
- Can't bind C-z to a readline function without getting 'readline: maximum macro execution nesting level exceeded' with fzf-cd - Alt-C HOT 5
- preserve whitespace flag s not working? HOT 1
- How to find file from zoxide result ? HOT 1
- Broken zsh shell integration on 0.51+ HOT 1
- last commit broke fzf.vim integration HOT 1
- code **<TAB> doesn't execute fzf HOT 4
- execute(echo {}) does not work with tmux integration on v0.53.0 HOT 2
- Divide by zero with --tiebreak=end for long-line inputs HOT 1
- Windows: Mouse-clicking doesn't work properly in bash HOT 1
- Merge fish history before showing history widget HOT 3
- Vi-mode for input field navigation and editing. Maybe by introducing readline support? HOT 1
- Ability to control search order (or have `--nth` respect it) HOT 2
- Cannot exclude symbolic links from search HOT 9
- `--walker-skip symlink-to-dir` not skipped
- Missing directory slashes when completion chosen HOT 5
- make CTRL-T work with directories outside the current one HOT 3
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.