diff --git a/internal/dirs/dirs.go b/internal/dirs/dirs.go index 55d797f..c43a61f 100644 --- a/internal/dirs/dirs.go +++ b/internal/dirs/dirs.go @@ -12,10 +12,18 @@ import ( func UnExpand(dir string) (outdir string) { var ( home = os.Getenv("HOME") + pwd string + err error ) outdir = filepath.Clean(dir) - outdir = strings.ReplaceAll(outdir, home, "~") + + pwd, err = os.Getwd() + if err == nil { + outdir = strings.Replace(outdir, pwd, ".", 1) + } + + outdir = strings.Replace(outdir, home, "~", 1) return }