File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -364,7 +364,7 @@ project_open() {
364364 tmux rename-window " ${1} "
365365 fi
366366
367- if [ -n " ${2} " ] && [[ " ${2} " != " theme " ]] ; then
367+ if [ -n " ${2} " ]; then
368368 # shellcheck disable=SC2164
369369 cd " ${NEW_PATH} /${2} "
370370 return
@@ -376,20 +376,8 @@ project_open() {
376376 NEW_PATH=" ${NEW_PATH} /site"
377377 fi
378378
379- if [ -z " ${2} " ]; then
380- # shellcheck disable=SC2164
381- cd " ${NEW_PATH} "
382- return
383- fi
384-
385- THEME_PATH=" $( find " ${NEW_PATH} /web/app/themes" -mindepth 2 -maxdepth 2 -type f -name composer.json 2> /dev/null | LC_ALL=C sort | head -n1) "
386- THEME_PATH=" ${THEME_PATH% composer.json} "
387- if [ -z " ${THEME_PATH} " ]; then
388- echo " No theme available" >&2
389- return 1
390- fi
391-
392- cd " ${THEME_PATH} " || return
379+ # shellcheck disable=SC2164
380+ cd " ${NEW_PATH} "
393381}
394382alias po=' project_open'
395383
@@ -403,7 +391,7 @@ _project_open_projects() {
403391_project_open_targets () {
404392 local name=" ${1} " project_path target_dir
405393 [[ -n " ${name} " ]] || return 0
406- project_path=" $( _project_open_resolve " ${name} " cache_only) " || return 0
394+ project_path=" $( _project_open_resolve " ${name} " cache_only) "
407395 [[ -n " ${project_path} " ]] || return 0
408396 find " ${project_path} " -mindepth 1 -maxdepth 1 -type d -not -name ' .*' 2> /dev/null | while IFS= read -r target_dir; do
409397 printf ' %s\n' " ${target_dir##*/ } "
You can’t perform that action at this time.
0 commit comments