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:
parent
1ca507d1dd
commit
56fecff550
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user