nushell: Git histogram example not working
Describe the bug
I just started using nushell and it feels great!.
I went through the cookbook to check the examples but I could not get the git histogram example to work.
To Reproduce Steps to reproduce the behavior:
- Execute the command
git log "--pretty=format:%h(nu)%aN(nu)%s(nu)%aD" | lines | split column "(nu)" sha1 committer desc merged_at | histogram committer merger | sort-by merger | reversein a git repository
Expected behavior I expected an histogram similar to the shown it the examples.
Screenshots

Configuration (please complete the following information):
- OS: Windows 10 Enterprise - 1909
- Nu version: 0.21.0
- Optional features:
Add any other context about the problem here.
I did some tests and the histogram command seams to work fine. if I change the histogram column parameter from ‘committer’ to ’ sha1’, it works.
There is something related to the column but I could not identify what’s the issue.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17
I’ve seen this before and unfortunately it’s the difference between
giton Linux andgiton Windows. I just ran this on windows and it worked.git log --pretty="format:%h(nu)%aN(nu)%s(nu)%aD" | lines | split column "(nu)" sha1 committer desc merged_at | histogram committer merger | sort-by merger | reverseFeel free to submit a documentation PR on this issue.
sounds good. i’m closing this then. thanks for your help.
posted here https://www.nushell.sh/cookbook/
Duh, i forgot there’s a special
group-byfor dates.git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 25 | lines | split column "»¦«" commit subject name email date | update date { get date | str to-datetime} | group-by date date | pivotgroup-by dateis a subcommand and it’s specifically for dates. So, now everything seems to be working.Any thoughts of what else we should add to this? https://gist.github.com/fdncred/caa086a07da3b3d7ee771d16999b13d5
I need to go over it again for flow because i jumped back and forth through it and probably lose the readers train of thought.