1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-01-19 00:37:35 +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() { function pj() {
local cmd="cd" local cmd="cd"
local project="$1" local project=""
local editor="${EDITOR}"
if [[ "open" == "$project" ]]; then if [[ "$1" == "open" ]]; then
shift shift
project=$* project="$1"
cmd=${=EDITOR} shift
[[ -n "$1" ]] && editor="$1"
cmd="$editor"
else else
project=$* project="$*"
fi fi
for basedir ($PROJECT_PATHS); do for basedir in $PROJECT_PATHS; do
if [[ -d "$basedir/$project" ]]; then if [[ -d "$basedir/$project" ]]; then
$cmd "$basedir/$project" $cmd "$basedir/$project"
return return