-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to force colour output with a pager ? #219
Comments
Oh, that is a bug.
|
Or maybe it only worked for |
FWIW I also have not been able to get the |
I'm interested in this too, and I also love
I also tried with |
@jessefarinacci I was also trying to use it in fzf! The Below is an example screenshot and a Code
I realize now it uses # zsh
pastel random -n25 \
| pastel format hex \
| rs 0 5 \
| fzf \
--bind 'enter:become:print -l ${(z):-{}}' \
--preview-window right,75% \
--preview "\
print -l \${(z):-{}} \
| xargs -S9999 -I% zsh -c '\
fg=\$(pastel textcolor \"%\" | pastel mix gray -s RGB -f 0.2); \
pastel -f paint \${fg} -n -o \"%\" \"\$(pastel format hex \"%\")~\"; \
pastel -f paint \${fg} -n -o \"%\" \"\$(pastel format name \"%\")~\"; \
pastel -f paint \${fg} -n -o \"%\" \"\$(pastel format rgb \"%\")~\"; \
pastel -f paint \"%\" \" $(curl -sS https://icanhazdadjoke.com)\"
' \
| perl -p \
-e 's/;(\d)(?!\d\d)/;0\$1/g;' \
-e 's/;(\d\d)(?!\d)/;0\$1/g;' \
-e 's/0?(38|48);00(2|5)(?=(;\d\d\d)+)/\$1;\$2/g' \
| column -ts~ \
" \
| pastel -f color I'm extremely color blind though so maybe I shouldn't be working with colors in the first place 😅 |
I love pastel, thanks!
Output is often long and I'd like to view it in a pager. I think pastel disables colour output when stdout is non-interactive. How can I force it not to ? I tried eg
TERM=xterm-256color COLOR=always pastel -f list | less -R
The text was updated successfully, but these errors were encountered: