kaelzhang / shell-safe-rm

😎 Safe-rm: A drop-in and much safer replacement of bash rm with nearly full functionalities and options of the rm command! Safe-rm will act exactly the same as the original rm command.
Other
428 stars 33 forks source link

prevent deleting xdg `~/.config/user-dirs.dirs` directories #16

Open trappedinspacetime opened 6 years ago

trappedinspacetime commented 6 years ago

First of all, thank you for coding such a useful tool. It would be good if it had preemtive non-deletion mechanism for user space essential directories, such as

   XDG_DESKTOP_DIR="$HOME/Desktop"
   XDG_DOWNLOAD_DIR="$HOME/Downloads"
   XDG_TEMPLATES_DIR="$HOME/Templates"
   XDG_PUBLICSHARE_DIR="$HOME/Public"
   XDG_DOCUMENTS_DIR="$HOME/Documents"
   XDG_MUSIC_DIR="$HOME/Music"
   XDG_PICTURES_DIR="$HOME/Pictures"
   XDG_VIDEOS_DIR="$HOME/Videos"

We can check the path of those directories with

  xdg-user-dir DESKTOP
  xdg-user-dir DOWNLOAD
  xdg-user-dir TEMPLATES
  xdg-user-dir  PUBLICSHARE