numbered pj, in-docker prompt indicator
This commit is contained in:
2
.zshrc
2
.zshrc
@@ -168,7 +168,7 @@ function pj {
|
||||
[[ -d $d ]] && roots+=(${d:A})
|
||||
done
|
||||
(( ${#roots} )) || { echo "no project dirs found"; return 1 }
|
||||
dir=$(find -L ${(u)roots} -mindepth 1 -maxdepth 1 -type d 2>/dev/null | fzf --reverse --prompt="project> " --query="$1" --select-1 --exit-0) && cd "$dir"
|
||||
dir=$(find -L ${(u)roots} -mindepth 1 -maxdepth 1 -type d 2>/dev/null | sort | awk '{printf "%3d %s\n", NR, $0}' | fzf --reverse --prompt="project> " --query="$1" --select-1 --exit-0 --with-nth=2.. | sed 's/^ *[0-9]* //') && cd "$dir"
|
||||
}
|
||||
|
||||
function mkcd {
|
||||
|
||||
Reference in New Issue
Block a user