Skip to content
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

Consider improving highlighting #21

Open
gytis-ivaskevicius opened this issue Nov 9, 2020 · 1 comment
Open

Consider improving highlighting #21

gytis-ivaskevicius opened this issue Nov 9, 2020 · 1 comment

Comments

@gytis-ivaskevicius
Copy link

Hey, great project but I have a little suggestion - Implement some sort of type highlighting. This is my current temp workaround:

manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --ansi --preview="manix '{}' | sed 's/type: /> type: /g' | bat -l Markdown --color=always --plain" 

I am just adding the symbol > in front of the type. Seems to get the job done :)

Thanks for this project, and good luck 👍

@blaggacao
Copy link

blaggacao commented Aug 21, 2021

manix "" | rg -o '^# ([\w.-_'"'"']+)' -r '$1' | awk '!x[\$0]++' | fzf --ansi --preview="manix '{}' | sd 'type: ' '> type: ' | bat -l Markdown --color=always --plain"

addded | awk '!x[\$0]++' for efficient deduplication

manix_hits="^# ([\w.-_']+)"
manix_preview="manix '{}' | sd 'type: ' '> type: ' | bat -l Markdown --color=always --plain"
alias mnix="manix '' | rg -o \"$manix_hits\" -r '\$1' | awk '!x[\$0]++' | fzf --ansi --preview=\"$manix_preview\""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants