diff --git a/internal/dirs/dirs.go b/internal/dirs/dirs.go index c43a61f..1ec4103 100644 --- a/internal/dirs/dirs.go +++ b/internal/dirs/dirs.go @@ -19,8 +19,8 @@ func UnExpand(dir string) (outdir string) { outdir = filepath.Clean(dir) pwd, err = os.Getwd() - if err == nil { - outdir = strings.Replace(outdir, pwd, ".", 1) + if err == nil && home != pwd { + outdir = strings.Replace(outdir, pwd, "$PWD", 1) } outdir = strings.Replace(outdir, home, "~", 1)