#!/usr/bin/env zsh : "${1:=--help}" case "$1" in -h|--help|help) cat <> "$(_goto_file)" ;; get) realpath "$(_awk "/^$2\s/ {print \$2;exit}" `_goto_file` | _zsh_goto_sed "s|^~|$HOME|")" ;; rm) _zsh_goto_sed -i "/$2/d" "$(_goto_file)" ;; ls) _awk '{print $1;}' "$(_goto_file)" ;; *) echo "Unknown command: $@" >&2 exit 1 ;; esac