func main() {
if _, err := os.ReadFile("~/.bashrc"); err != nil {
log.Fatal(err)
}
fmt.Println("ok")
}
Meanwhile over in shell land: $ echo ~/~/~
/home/jrockway/~/~
The behavior is actually kind of amazing.I mention it because while "yourprogram ~/path/to/file" always works, having a repl that asks for a filename might not work. I've seen a lot of software where this DOES work, so I think it counts as a "most TUI programs do this" thing.