pttodo-cli default file via env
parent
8c45d4a7df
commit
f7dac79233
|
|
@ -22,7 +22,11 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func _main() error {
|
func _main() error {
|
||||||
filepath := flag.String("f", "-", "path to yaml file")
|
defaultFilepath, ok := os.LookupEnv("PTTODO_FILE")
|
||||||
|
if !ok {
|
||||||
|
defaultFilepath = "-"
|
||||||
|
}
|
||||||
|
filepath := flag.String("f", defaultFilepath, "($PTTODO_FILE) path to yaml file")
|
||||||
e := flag.Bool("e", false, "edit file")
|
e := flag.Bool("e", false, "edit file")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
if *e {
|
if *e {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue