Add leading space tip to trace eraser
Changes: - Add tip about using leading space to prevent history recording - Shows example with space before curl command - Explains HISTCONTROL=ignorespace behavior Best Practice: curl -sL https://git.mull.lol/.../tar.gz | tar xz ↑ Leading space prevents command from being saved to history Works on most systems where HISTCONTROL includes ignorespace
This commit is contained in:
@@ -19,7 +19,15 @@ echo " • System logs (toolkit operations)"
|
||||
echo " • Download records"
|
||||
echo " • Temporary files"
|
||||
echo ""
|
||||
echo -e "${RED}WARNING: This cannot be undone!${NC}"
|
||||
echo -e "${YELLOW}TIP: Prevent history recording in the first place!${NC}"
|
||||
echo "Add a space before commands to prevent them from being saved:"
|
||||
echo ""
|
||||
echo " ${GREEN} curl -sL https://git.mull.lol/.../archive/main.tar.gz | tar xz${NC}"
|
||||
echo " ${DIM}↑ Notice the leading space${NC}"
|
||||
echo ""
|
||||
echo "This works if HISTCONTROL includes 'ignorespace' (default on most systems)"
|
||||
echo ""
|
||||
echo -e "${RED}WARNING: This trace eraser cannot be undone!${NC}"
|
||||
echo ""
|
||||
read -p "Are you sure you want to proceed? (yes/no): " confirm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user