Re:Show HN: Unix tool that visualizes shell commands usage
by howeyc on Friday February 26, 2021 @05:47PM
(#26280779)
cd tsukae
go build
./tsukae
Re:Show HN: Unix tool that visualizes shell commands usage
by PeterWhittaker on Saturday February 27, 2021 @08:32AM
(#26284729)
Closer! That got me the executable. Now I get a stack trace....
% ./tsukae bash
panic: runtime error: slice bounds out of range [:7] with capacity 4
goroutine 1 [running]:
github.com/irevenko/tsukae/cmd.GetShellCommandsUsage(0x1205b84, 0x4, 0x7, 0x4, 0x3, 0xc000066180, 0xc000127d78, 0x1159965, 0xc000120500)
/Users/pww/tsukae/cmd/shell_name.go:22 +0x16d
github.com/irevenko/tsukae/cmd.glob..func4(0x135df20, 0xc00005c8b0, 0x0, 0x1)
/Users/pww/tsukae/cmd/commands.go:88 +0x1bf
github.com/spf13/cobra.(*Command).execute(0x135df20, 0xc00005c8a0, 0x1, 0x1, 0x135df20, 0xc00005c8a0)
/Users/pww/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x135e1a0, 0xc000000180, 0xc000127f78, 0x10069e5)
/Users/pww/go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x375
github.com/spf13/cobra.(\*Command).Execute(...)
/Users/pww/go/pkg/mod/github.com/spf13/[email protected]/command.go:897
main.main()
/Users/pww/tsukae/main.go:12 +0x36
Re:Show HN: Unix tool that visualizes shell commands usage
by irevenko on Sunday February 28, 2021 @08:19AM
(#26293224)
i figured it out, you just need to have bigger history, currently you only have 4 unique commands in your hist file.
Re:Show HN: Unix tool that visualizes shell commands usage
by PeterWhittaker on Monday March 01, 2021 @08:28AM
(#26302547)
My history has a few thousand commands....
Any ideas?
FYI,