Skip to content

Commit

Permalink
add 'cd' as alias of 'cd ~'
Browse files Browse the repository at this point in the history
  • Loading branch information
akymos committed Dec 4, 2022
1 parent 4af66c7 commit 5e54202
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ func PopulateAlias() error {

aliasTpl := template.Must(template.New("cd_override").Parse(`#!/bin/bash
cd() {
if [[ -d $* ]]; then builtin cd "$@" || return;
if [[ $# -eq 0 ]]; then builtin cd ~ || return;
elif [[ -d $* ]]; then builtin cd "$@" || return;
else
if [[ $* == "ff-config" ]]; then builtin cd {{ .BasePath }} || return;
{{- range $key, $val := .AliasList}}
Expand Down

0 comments on commit 5e54202

Please sign in to comment.