safe rm (linux command)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public ver1 Nov 9, 2018
tests sample test Nov 10, 2018
.gitignore sample test Nov 10, 2018
LICENSE Create LICENSE Nov 9, 2018
README.md
sfrm_zsh.sh

README.md

SFRM

SFRM (safe rm) is a preprocessor that checks every command you type on terminal and makes sure that you can not delete anything with the rm command easily.

Usage

Requirement

preexec - a default feature of zsh ( and ksh ) shell to do something you specify before every command you typed run. More about preexe go here.

Install

# Pull down our file from GitHub and write it to our home directory as a hidden file.
curl https://raw.githubusercontent.com/khanhtc1202/sfrm/master/sfrm_zsh.sh -o ~/.sfrm_zsh.sh
# Add its source to the tail of shell config
cat ~/.sfrm_zsh.sh >> ~/.zshrc
source ~/.zshrc

Optional

The number of printout questions can be set by $SFRM_MAX env. By default three questions will be printout.

TODO

Supported shell(s)

  • zsh
  • bash