Skip to content

Commit 8773a99

Browse files
committed
support DEBUG when expanding aliases
1 parent 52a02a7 commit 8773a99

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/gh/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@ func main() {
3939

4040
cmd, _, err := command.RootCmd.Traverse(expandedArgs)
4141
if err != nil || cmd == command.RootCmd {
42+
originalArgs := expandedArgs
4243
expandedArgs, err = command.ExpandAlias(os.Args)
4344
if err != nil {
4445
fmt.Fprintf(stderr, "failed to process aliases: %s\n", err)
4546
os.Exit(2)
4647
}
48+
if hasDebug {
49+
fmt.Fprintf(stderr, "%v -> %v\n", originalArgs, expandedArgs)
50+
}
4751
}
4852

4953
command.RootCmd.SetArgs(expandedArgs)

0 commit comments

Comments
 (0)