fix for cd home with a tilda
This commit is contained in:
parent
bc4c3c127b
commit
5df5c23489
4
nav.go
4
nav.go
@ -320,12 +320,12 @@ func (nav *Nav) top() {
|
||||
}
|
||||
|
||||
func (nav *Nav) cd(wd string) error {
|
||||
wd = strings.Replace(wd, "~", envHome, -1)
|
||||
|
||||
if !path.IsAbs(wd) {
|
||||
wd = path.Join(nav.currDir().path, wd)
|
||||
}
|
||||
|
||||
wd = strings.Replace(wd, "~", envHome, -1)
|
||||
|
||||
err := os.Chdir(wd)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cd: %s", err)
|
||||
|
Loading…
Reference in New Issue
Block a user