Skip to content

datsfilipe/trxsh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trxsh

build

Trxsh is a simple and efficient command-line trash manager written in Go. It allows you to safely delete, list, restore, and permanently remove files from your system's trash directory.

Table of Contents

Installation

  • Arch:

The package is now in AUR, so to install it you can use an AUR helper like yay:

yay -Syu trxsh

or go through the process manually:

sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/trxsh.git
cd yay
makepkg -si
  • NixOS:

For now you can add a custom derivation to your NixOS config. Please refer to derivation example.

Features

  • deletion: move files to a designated trash directory instead of permanently deleting them.​
  • list: biew all files currently in the trash.​
  • restore: recover files from the trash by ID or using an interactive fzf interface.​
  • cleanup: permanently delete files in the trash (use --days N to keep recent files).​

Usage

Usage: trxsh [OPTIONS] [FILES]
Options:
  --fzf, -f        : Restore files using fzf
  --list, -l       : List files in trash
  --restore, -r ID : Restore file by ID
  --cleanup, -c    : Empty trash (use --days N to keep recent files)
  --dir-sizes, -s  : Show directory sizes
  --help, -h       : Show this help

Trash Specification

I've tried implementing the basics from freedesktop.org trash specification, but I haven't checked if eveything meets the spec. If you feel like this is an important matter, please feel free to address any issue you find with a proper PR, or to point out and I can work on that whenever I have some spare time.

License

This project is licensed under the MIT License.

About

Trxsh is a trash cli built in Go.

Topics

Resources

License

Stars

Watchers

Forks