Skip to content

KuangyeChen/zsh-rm2trash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

zsh-rm2trash

Oh-My-Zsh plugin.
Write after a sad story of rm -rf.

Install (with Oh-My-Zsh)

  1. Clone this repository into $ZSH_CUSTOM/plugins (by default ~/.oh-my-zsh/custom/plugins)

    git clone https://github.com/KuangyeChen/zsh-rm2trash ${ZSH_CUSTOM}/plugins/zsh-rm2trash
  2. Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):

    plugins=(zsh-rm2trash)

Usage

Trash directory is set by $ZSH_TRASH, by default $HOME/.Trash, when in Mac OSX this is the same directory used by Finder, so the command works like dragging to Trash but without Put Back function (need to parse .DS_Store file).

Command Description
rm alias rm to rm2trash
rm2trash mv files to trash
lstrash ls trash dir
cdtrash cd to trash dir
cleartrash clear trash dir (real rm)

Releases

No releases published

Packages

No packages published

Languages