kshutils/jmod

16 lines
282 B
Plaintext
Raw Normal View History

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