Code Monkey home page Code Monkey logo

brash's Introduction

Brash V0.1.2

Table of Contents

Why Brash

Well, why not. As you see its similar to Trash_cli. Unlike Trash_cli, Brash don't Depends on any Python libs just Bash Scripting.

So why not ?

About

Brash Cli Trash Manager full in Bash

Brash allows you to...

  • Delete files and folders, even the ones start with "-"
  • List out Trash contant
  • Clean Trash
  • Restore files from trash
  • Nice progress viewer of what happened
  • Use regular expressions

Brash can automatically...

  • Rename existing files during Delete or Restore
  • Create a trash Folder in Removable Devices

Quick Start

  • Installation requires :

    Probably you just need Dialog

  • Set up Brash:

     git clone https://github.com/zakariaGatter/brash.git ~/brash
     cd ~/brash
     git checkout tags/v0.1.2
     mkdir -p ~/.local/bin
     cp bin/brash ~/.local/bin
     chmod +x ~/.local/bin/brash

Using Brash

Brash-0.1.2: Cli Trash Manager in Pure Bash
USAGE: brash [OPTIONS] ... files ...

OPTIONS:
  -d <files>    Move to Trash the giving files
  -r            Restore Files and Directories from Trash
  -l            List of Deleted files
  -c            Clean Trash Bin
    --date      Sort the Resoult by Date
    --file      Sort the Resoult by file name
  -s            Calculate Trash size
  -i            Ask before every remove
  -I            Ask once before removing more than three files
  -v            Explaine what been done
  -h            Display this help dialog
  -V            Display Version

NOTE:
  Format for '--date' option is (YYYY-MM-DD) or human readable date string
    See: 'man date' for more information.

  Options
    (--date/--file) options work only with -c,-l,-r Main Options

Preview

List Verbose Restore

Examples

  • Delete file or Directory (Add '-v' for verbose)

    $ brash -d EX
    $ brash -d EX*
    $ brash -d EX/*
    $ brash -dv EX/[A-Z]*
    
  • Restore file from Trash (Add '-v' for verbose)

    $ brash -r
    $ brash -r --date "2022-05-05"
    $ brash -r --file vimrc.bk viminfo init.lua
    
  • Show list of files in trash

    $ brash -l
    $ brash -l --date "yesterday"
    $ brash -l --file code[1-9].py
    
  • Clean Trash (Delete permanently)

    $ brash -c
    $ brash -c --date "week ago"
    $ brash -c --file *.db
    
  • Show Trash size

    $ brash -s
    

Help Needed

  • Create a man page for Brash

License

MIT License Copyright (c) 2019 Zakaria Barkouk The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

brash's People

Contributors

cesarga avatar mtesseracted avatar zakariagatter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mtesseracted

brash's Issues

idea: replace dialog menu with something else?

is a good CLI tool but once the dialog popup to restore a file it turns into a weird TUI with messy colors.

maybe just do similar to trash-restore with a list

or use fzf instead, you can have multiple hotkeys with fzf
e.g
tab = select single, escape = cancel
ls | fzf -m --bind ctrl-a:select-all,ctrl-d:deselect-all,ctrl-t:toggle-all

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.