Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
smartcd: if no string argument is provided to cd .. move to parent …
Browse files Browse the repository at this point in the history
…directory.
  • Loading branch information
CodesOfRishi committed Dec 14, 2021
1 parent d076fa6 commit 1324171
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions smartcd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ __smartcd__() {

# feature
parent_dir_hop() {
if [[ $1 = "" ]]; then
builtin cd .. && generate_recent_dir_log
return
fi

local parent_dir_log=$( mktemp ) # temporary file to store parent directories's absolute paths

_path=${PWD%/*}
Expand Down

0 comments on commit 1324171

Please sign in to comment.