#!/bin/sh while true; do # Readline read -r -p "git> " cmd # EOF test $? -ne 0 && break # History history -s "$cmd" # Built-in commands case $cmd in ls) cmd=ls-files;; quit) break;; esac # Execute git $cmd done echo