diff options
| author | Jeff Carr <[email protected]> | 2025-10-09 21:32:06 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-09 21:32:06 -0500 |
| commit | ee47b39efae2347e5ee3fff2888a008d4848276b (patch) | |
| tree | d3d553f3df83eaa16111137e220b0a4a7b0b029c | |
| parent | 43932185ea487ec922d3e4a50625b6de22358c2a (diff) | |
set the terminal titlev0.25.75
| -rw-r--r-- | doCommit.go | 3 | ||||
| -rw-r--r-- | doPatch.go | 3 | ||||
| -rw-r--r-- | setTerminalTitle.go | 16 |
3 files changed, 21 insertions, 1 deletions
diff --git a/doCommit.go b/doCommit.go index 9a24263..8f041b3 100644 --- a/doCommit.go +++ b/doCommit.go @@ -16,7 +16,8 @@ func doCommit() (string, error) { found := me.forge.CheckDirty() var newpatches bool for repo := range found.IterAll() { - log.Info("do a commit on repo", repo.GetNamespace()) + s := log.Sprintf("%s [git commit --all]", repo.GetNamespace()) + setTerminalTitle(s) if err := doCommitRepo(repo); err != nil { badExit(err) } @@ -86,6 +86,9 @@ func doPatchList() (string, error) { log.Info("no namespace", patch.PatchId, patch.Namespace, patch.Comment) continue } + if patch.NewHash == "na" { + needfix = 1 + } newId, newHash, err := isPatchIdApplied(repo, patch) if errors.Is(err, ErrorGitPullOnDirty) { log.Info(patch.PatchId, newId, repo.Namespace, "repo dirty", patch.Comment) diff --git a/setTerminalTitle.go b/setTerminalTitle.go new file mode 100644 index 0000000..a39e386 --- /dev/null +++ b/setTerminalTitle.go @@ -0,0 +1,16 @@ +package main + +import ( + "fmt" +) + +// setTitle prints the escape sequence to change the terminal title. +func setTerminalTitle(title string) { + fmt.Printf("\033]2;%s\007", title) +} + +// resetTitle prints the escape sequence to clear the title. +// Most terminals will revert to their default profile title. +func resetTerminalTitle() { + fmt.Printf("\033]2;\007") +} |
