Skip to content

Inline shell script in bat/config? #2785

Answered by tony-sol
tony-sol asked this question in Q&A
Discussion options

You must be logged in to vote

Yeah, i did something similar, like

export __BAT_THEME="\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo vs-dark || echo vs-light)"

alias cat="bat --paging=never ${__BAT_THEME:+--theme=\"$__BAT_THEME\"}"

Works pretty well

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tony-sol
Comment options

Answer selected by tony-sol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants