Improve 'rm' command
This commit is contained in:
parent
83ff324acf
commit
ce23cf89b9
1 changed files with 17 additions and 2 deletions
19
bin/get
19
bin/get
|
|
@ -81,8 +81,23 @@ add)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
rm)
|
rm)
|
||||||
echo Removing
|
echo Removing tracked files
|
||||||
git rm "$2"
|
git rm -r "$2"
|
||||||
|
# Check to see if there are still remaining files
|
||||||
|
if [ -d "$2" ]
|
||||||
|
then
|
||||||
|
# Prompt user to delete untracked files
|
||||||
|
read -n 1 -p "Would you like to delete the untracked files as well? [Y/n]: " answer
|
||||||
|
echo -e '\n'
|
||||||
|
answer=${answer:-Y}
|
||||||
|
case "$answer" in
|
||||||
|
[Yy] )
|
||||||
|
rm -Rf "$2"
|
||||||
|
;;
|
||||||
|
[Nn] )
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
reset)
|
reset)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue