Skip to content

Commit

Permalink
Fix lscd -- list directories in creation order for ease of use too
Browse files Browse the repository at this point in the history
  • Loading branch information
GMadorell committed Jun 8, 2023
1 parent abc354a commit 912529c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ function ls_grep() {
alias lg="ls_grep"
alias lsg="ls_grep"
function lscd() {
local chosen_directory=$(ls -d .*/ */ | percol --prompt='<green>Select directory to cd into:</green> %q')
local chosen_directory=$(ls -lt -d */ | awk '{print substr($0, index($0,$NF))}' | percol --prompt='<green>Select directory to cd into:</green> %q')
cd "$chosen_directory"
}
alias cdls="lscd"
Expand Down

0 comments on commit 912529c

Please sign in to comment.