Enable tab completion for custom directory input

Use read -e to enable readline support, providing tab completion and line editing when entering custom deployment paths. Also expand tilde to home directory.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Paul Trowbridge 2026-01-16 10:54:41 -05:00
parent 1ca507d1dd
commit 56fecff550

View File

@ -22,11 +22,13 @@ case $choice in
;;
3)
DEPLOY_MODE="custom"
read -p "Enter deployment directory (required): " DEPLOY_DIR
read -e -p "Enter deployment directory (required): " DEPLOY_DIR
if [ -z "$DEPLOY_DIR" ]; then
echo "Error: Directory path is required"
exit 1
fi
# Expand tilde to home directory
DEPLOY_DIR="${DEPLOY_DIR/#\~/$HOME}"
;;
*)
echo "Error: Invalid choice"