#!/bin/zsh -f FIELD=$1 shift VALUE=$1 while : do echo -n "Book ID (q quits): " read ID [[ $ID == "q" ]] && exit 0 library edit $ID $FIELD $VALUE done