kshutils/jmod

16 lines
288 B
Plaintext
Raw Normal View History

2022-09-07 05:54:31 -04:00
function jmod
{
(( $# != 1 )) && return 64
2022-09-07 05:59:33 -04:00
typeset m=$(jr && pwd)/modules/apps
typeset d=$(find $m -maxdepth 2 -mindepth 2 -type d -iregex ".*/.*$1$")
2022-09-07 05:54:31 -04:00
[[ -z $d ]] && return 1
2022-09-07 05:59:33 -04:00
if (( $(print $d | wc -w) > 1 ))
2022-09-07 05:54:31 -04:00
then
select d in $d
do
break
done
fi
2022-09-07 05:59:33 -04:00
print ${d##*/} && cd $d
2022-09-07 05:54:31 -04:00
}