ref: 91805c65b6cc0db891b87d64eea1f240dae7021b
dir: /select-handler/
#!/bin/rc rfork n skel=$rc_gemd_dir^/skel fs_root=/lib/gem bind $fs_root $skel^/pages bind /bin $skel^/bin bind /rc $skel^/rc bind -c '#e' $skel^/env bind $skel / fs_root=/pages if(~ $location /) location=/index.gem if(~ $location /search){ . $rc_gemd_dir/handlers/require-input 'Input a search query' echo 20^' '^'text/gemini'^$cr sq=`{echo $query | urlencode -d} ls $fs_root | grep $"sq | sed ' s,^'$fs_root'/,,g s,^,=> ,g' exit } exec serve-static