oknozor / toml-bombadil

A dotfile manager with templating
MIT License
230 stars 24 forks source link

[FEATURE] - Improve `get var` command #40

Closed oknozor closed 1 week ago

oknozor commented 4 years ago

Currently listing variables output the following :

❯ bombadil get vars      
alacritty_background: #292C3E
wob_border_color: #FF6D7070
pulse_audio_fg: #0d0d0d
client_unfocused_indicator: #6D7070
client_focused_indicator: #1BA6FA
light_black: #6D7070
foreground: #EBEBEB
client_urgent_indicator: #6D7070
alacritty_cyan: #21DEEF
magenta: #8763B8
light_cyan: #73FBF1
...

This can quickly be huge if you have a lot of variables in your config. A better solution would be to list variables per files like so :

"bombadil.d/vars.toml" :
  alacritty_background: #292C3E
  wob_border_color: #FF6D7070

"bombadil/another_varfile.toml" : 
  foreground: #EBEBEB
  magenta: #8763B8
# and so on 

Even better we could add info regarding indirection (variable reference) :

"bombadil.d/vars.toml" :
  alacritty_background: %background # here the value should be colored
  wob_border_color: #FF6D7070

"bombadil/another_varfile.toml" : 
  background: #EBEBEB # here the key should have the same color
  magenta: #8763B8
# and so on 
ghost commented 3 years ago

hey heads up im planning to work on this