Skip to content

Commit

Permalink
Replace splitting tag in git log
Browse files Browse the repository at this point in the history
Replacing the (nu) tag allows removing the quotes from the formatting string.
The new command works in both linux and windows systems.
Discussion in nushell/nushell#2730
  • Loading branch information
janosimas committed Nov 16, 2020
1 parent eb91b8c commit 9f3b005
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cookbook/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Deleted branch post-argument-positions (was 9d34ec9).

Parse formatted commit messages (more details in the parsing git log section)

`git log "--pretty=format:%h(nu)%aN(nu)%s(nu)%aD" | lines | split column "(nu)" sha1 committer desc merged_at | first 10`
`git log --pretty=%h»¦«%aN»¦«%s»¦«%aD | lines | split column "»¦«" sha1 committer desc merged_at | first 10`


Output
Expand All @@ -46,7 +46,7 @@ Output

### View git comitter activity as a `histogram`

`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 | reverse`
`git log --pretty=%h»¦«%aN»¦«%s»¦«%aD | lines | split column "»¦«" sha1 committer desc merged_at | histogram committer merger | sort-by merger | reverse`

```
━━━━┯━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Expand Down

0 comments on commit 9f3b005

Please sign in to comment.