diff options
Diffstat (limited to 'commands/cd.go')
-rw-r--r-- | commands/cd.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/commands/cd.go b/commands/cd.go index dc05adbb..8c0191c2 100644 --- a/commands/cd.go +++ b/commands/cd.go @@ -5,8 +5,8 @@ import ( "os" "strings" + "git.sr.ht/~rjarry/aerc/lib/xdg" "git.sr.ht/~rjarry/aerc/widgets" - "github.com/mitchellh/go-homedir" ) var previousDir string @@ -54,10 +54,7 @@ func (ChangeDirectory) Execute(aerc *widgets.Aerc, args []string) error { target = previousDir } } - target, err = homedir.Expand(target) - if err != nil { - return err - } + target = xdg.ExpandHome(target) if err := os.Chdir(target); err == nil { previousDir = cwd aerc.UpdateStatus() |