#!/usr/bin/env rc cmd=`{ls /media | dmenu -i -l 15} if(~ $cmd '') { echo bye } if not { sync umount /media/$cmd }