gomi

command
v0.0.0-...-290aaca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 21 Imported by: 0

README

gomi

License GitHub Releases
Website GitHub Releases Go version

🗑️ Replacement for UNIX rm command!

gomi is a simple trash tool that works on CLI, written in Go

The concept of the trashcan does not exist in Command-line interface (CLI). If you have deleted an important file by mistake with the rm command, it would be difficult to restore. Then, it's this gomi. Unlike rm command, it is possible to easily restore deleted files because gomi have the trashcan for the CLI.

Features

  • Like a rm command but not unlink (delete) in fact (just move to another place)
  • Easy to restore, super intuitive
  • Compatible with rm command, e.g. -r, -f options
  • Nice UI, awesome CLI UX
  • Easy to see what gomi does with setting GOMI_LOG=[trace|debug|info|warn|error]

Usage

$ alias rm=gomi
$ rm -rf important-dir
$ rm --restore
Search: █
Which to restore?
  ▸ important-dir
    main_test.go
    main.go
    test-dir
↓   validate_test.rego

Name:             important-dir
Path:             /Users/b4b4r07/src/github.com/b4b4r07/important-dir
DeletedAt:        5 days ago
Content:            (directory)
  -rw-r--r--  important-file-1
  -rw-r--r--  important-file-2
  drwxr-xr-x  important-subdir-1
  drwxr-xr-x  important-subdir-2
  ...

Installation

Download the binary from GitHub Releases and drop it in your $PATH.

For macOS / Homebrew user:

$ brew install b4b4r07/tap/gomi

AUR users:

https://aur.archlinux.org/packages/gomi/

Versus

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL