1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-01-01 20:17:50 +08:00
This commit is contained in:
avycado13 2025-12-08 08:37:33 -08:00 committed by GitHub
commit 7a623395ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,17 +2,20 @@ alias pjo="pj open"
function pj() {
local cmd="cd"
local project="$1"
local project=""
local editor="${EDITOR}"
if [[ "open" == "$project" ]]; then
if [[ "$1" == "open" ]]; then
shift
project=$*
cmd=${=EDITOR}
project="$1"
shift
[[ -n "$1" ]] && editor="$1"
cmd="$editor"
else
project=$*
project="$*"
fi
for basedir ($PROJECT_PATHS); do
for basedir in $PROJECT_PATHS; do
if [[ -d "$basedir/$project" ]]; then
$cmd "$basedir/$project"
return