Skip to content

Commit 9dd720d

Browse files
committed
Update readme and add short parameter
1 parent a421d2a commit 9dd720d

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A terminal-based git history visualization tool with live updates and time-based navigation.
44

5-
![Go](https://img.shields.io/badge/Go-1.24+-00ADD8?logo=go&logoColor=white)
5+
![Go](https://img.shields.io/badge/Go-1.25+-00ADD8?logo=go&logoColor=white)
66

77
## Why gitree?
88

@@ -67,8 +67,10 @@ gitree /path/to/repo
6767
gitree ~/projects/myrepo
6868

6969
# With initial filters
70-
gitree -b main # Start with branch filter
71-
gitree -a "Alice" # Start with author filter
70+
gitree -b main # Filter by branch
71+
gitree -a "Alice" # Filter by author
72+
gitree -t v1.0.0 # Filter by tag
73+
gitree -b main -a "Alice" # Combine filters
7274

7375
# Version and updates
7476
gitree --version # Show version info
@@ -162,7 +164,7 @@ go build -o gitree ./cmd/gitree
162164

163165
## Requirements
164166

165-
- Go 1.24 or later
167+
- Go 1.25 or later
166168
- A terminal with 256-color support
167169

168170
## Dependencies

cmd/gitree/main.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ func main() {
3030
// Short flags
3131
flag.BoolVar(showVersion, "v", false, "Show version information")
3232
flag.BoolVar(showHelp, "h", false, "Show help message")
33+
flag.StringVar(filterBranch, "b", "", "Filter by branch name")
34+
flag.StringVar(filterAuthor, "a", "", "Filter by author name")
35+
flag.StringVar(filterTag, "t", "", "Filter by tag name")
3336

3437
flag.Usage = printUsage
3538
flag.Parse()
@@ -170,12 +173,12 @@ func printUsage() {
170173
fmt.Println(" gitree [flags] [path]")
171174
fmt.Println()
172175
fmt.Println("Flags:")
173-
fmt.Println(" --branch <name> Filter by branch name")
174-
fmt.Println(" --author <name> Filter by author name")
175-
fmt.Println(" --tag <name> Filter by tag name")
176-
fmt.Println(" --version, -v Show version information")
177-
fmt.Println(" --check-update Check for new releases")
178-
fmt.Println(" --help, -h Show this help message")
176+
fmt.Println(" -b, --branch <name> Filter by branch name")
177+
fmt.Println(" -a, --author <name> Filter by author name")
178+
fmt.Println(" -t, --tag <name> Filter by tag name")
179+
fmt.Println(" -v, --version Show version information")
180+
fmt.Println(" --check-update Check for new releases")
181+
fmt.Println(" -h, --help Show this help message")
179182
fmt.Println()
180183
fmt.Println("Examples:")
181184
fmt.Println(" gitree Open current directory")

0 commit comments

Comments
 (0)