#!/bin/bash
set -euo pipefail

# Check if at least one argument is provided
if [ $# -eq 0 ] || [ ! -e "$HOME/.local/bin/$1" ]; then
    echo "Error: No script file provided or script does not exist."
    echo "Usage: rmscript <SCRIPT_FILE>"
    exit 1  # Exit with a non-zero status indicating an error
fi

rm -f "$HOME/.local/bin/$1" && echo "$1 erased."
