1cbf8afb4a
- Untrack and delete compiled binaries (tarsum, gosoft.exe, rust uniq/uniq2);
ignore build outputs (dist/, bin/, *.exe, *.test, .ruff_cache/)
- Merge tools/go/ and projects/go-tools/go/ into projects/go-tools/<name>/
- Fix goipgrep .gitignore: bare 'ipgrep' pattern was ignoring cmd/ipgrep/,
so the main entrypoint was never tracked; now anchored to /ipgrep
- Archive duplicate implementations to archive/experimental/{rust,go}/
(uniq, between, tarsum rewrites); canonical versions stay in tools/
- Update README tool catalog to match new layout
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
30 lines
664 B
Go
30 lines
664 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"os/exec"
|
|
|
|
"github.com/erikdubbelboer/gspt" // Import the new library
|
|
)
|
|
|
|
func main() {
|
|
// Change the process title using the library
|
|
gspt.SetProcTitle("notmyname")
|
|
|
|
fmt.Println("Process name changed. Press any key to exit...")
|
|
|
|
// Disable input buffering
|
|
exec.Command("stty", "-F", "/dev/tty", "cbreak", "min", "1").Run()
|
|
// Do not display entered characters on the screen
|
|
exec.Command("stty", "-F", "/dev/tty", "-echo").Run()
|
|
|
|
var b []byte = make([]byte, 1)
|
|
os.Stdin.Read(b)
|
|
|
|
// Restore the original terminal settings
|
|
exec.Command("stty", "-F", "/dev/tty", "sane").Run()
|
|
|
|
fmt.Println("\nKey pressed. Exiting.")
|
|
}
|