is it possible to make a username argv alias?

This commit is contained in:
Jeff Carr 2025-01-17 05:16:03 -06:00
parent e40251c7fd
commit 4f282cc302
2 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,7 @@ package main
import ( import (
"fmt" "fmt"
"os" "os"
"os/user"
) )
/* /*
@ -20,7 +21,8 @@ func (args) doBashAuto() {
argv.doBashHelp() argv.doBashHelp()
switch argv.BashAuto[0] { switch argv.BashAuto[0] {
case "checkout": case "checkout":
fmt.Println("user devel master") usr, _ := user.Current()
fmt.Println("user devel master " + usr.Username)
case "commit": case "commit":
fmt.Println("--all") fmt.Println("--all")
case "config": case "config":

View File

@ -126,7 +126,7 @@ func main() {
doCheckDirtyAndConfigSave() doCheckDirtyAndConfigSave()
me.found = new(gitpb.Repos) me.found = new(gitpb.Repos)
findDirty() findDirty()
me.forge.PrintHumanTable(me.found) me.forge.PrintHumanTableDirty(me.found)
okExit("") okExit("")
} }