garden-rs / garden

Garden grows and cultivates collections of Git trees ~ Official mirror of https://gitlab.com/garden-rs/garden
https://garden-rs.gitlab.io
MIT License
64 stars 9 forks source link

show branch name with tree name #18

Closed shiqicao closed 8 months ago

shiqicao commented 1 year ago

I feel it's convenient to have branch name along with tree name, but maybe it's expensive to call for each branch.

davvid commented 1 year ago

It might be a little expensive. Luckily this feature is really easy to add as a custom command.

commands:
  show-branch: |
    echo -n "# ${TREE_NAME} "
    git symbolic-ref --short HEAD

Adding that allows you to run:

garden -q show-branch <tree-query>

A few questions -- we can see whether others have any opinions on these.

The current output is just # repo and if you use garden -v (aka --verbose) the output contains # repo /path/to/repo.

davvid commented 8 months ago

This has been implemented. # tree-name (branch) is what's displayed now.

Thanks for the sug!

https://garden-rs.gitlab.io/configuration.html#tree-display