shell: implement the reader loop
test: more test