mirror of
https://github.com/dylanaraps/shfm.git
synced 2026-11-13 17:01:22 +00:00
make ~ work in :cd. closes #9
This commit is contained in:
1 file changed
+8
@@ -321,6 +321,14 @@ main() {
|
|||||||
|
|
||||||
:?)
|
:?)
|
||||||
prompt "cd: " r
|
prompt "cd: " r
|
||||||
|
|
||||||
|
# false positive, behavior intentional
|
||||||
|
# shellcheck disable=2088
|
||||||
|
case $ans in
|
||||||
|
'~') ans=$HOME ;;
|
||||||
|
'~/'*) ans=$HOME/${ans#"~/"}
|
||||||
|
esac
|
||||||
|
|
||||||
cd "${ans:="$0"}" >/dev/null 2>&1|| continue
|
cd "${ans:="$0"}" >/dev/null 2>&1|| continue
|
||||||
set -- *
|
set -- *
|
||||||
y=1 y2=1 cur=$1
|
y=1 y2=1 cur=$1
|
||||||
|
|||||||
Reference in new issue
Block a user