We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1de3a3 commit 541a784Copy full SHA for 541a784
1 file changed
basics/git_add.sh
@@ -20,7 +20,7 @@ for i in "${!files[@]}"; do
20
done
21
22
# Ask user to pick a file
23
-read -p "Select the file number you want to upload: " choice
+read -r -p "Select the file number you want to upload: " choice
24
25
# Validate input
26
if ! [[ "$choice" =~ ^[0-9]+$ ]] || (( choice < 1 || choice > ${#files[@]} )); then
@@ -31,7 +31,7 @@ fi
31
filename="${files[$((choice-1))]}"
32
33
# Ask for commit message
34
-read -p "Enter commit message: " commit_msg
+read -r -p "Enter commit message: " commit_msg
35
36
# Detect current branch automatically
37
branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
0 commit comments