A command line interface for trash written in Rust (WIP)

Overview

trashctl

A command line interface for trash

GPLv3 License Continuous integration Deploy Rust

Features

  • Add file to trash
  • List files
  • Permanently delete a file
  • Restore file
  • Empty the trash

Documentation

If you want a complete documentation, see the doc on docs.rs. Otherwise, read the book

Screenshots

App Screenshot

Installation

Install with cargo

cargo install trashctl

AUR

Install from the AUR

yay -S trashctl

Install from source

For this, you need git and rustup

git clone https://github.com/0xMRTT/trashctl
cd trashctl
cargo b
./target/debug/trashctl

Use github releases

Download binaries on the releases page (in the right pane)

Usage/Examples

TODO

trashctl put foo

Contributing

Contributions are always welcome!

See CONTRIBUTING.md for ways to get started.

Please adhere to this project's CODE_OF_CONDUCT.

Running Tests

To run tests, run the following command

cargo test

Feedback

If you have any feedback, please open an discussion.

Support

For support, open an discussion or join the matrix channel.

FAQ

What can I do if y accidently empty my trash ?

Stop using your system. Boot into a live cd and use tools like photo rec

Authors and contributors

Tech Stack

cli: clap, clap_complete

Related

Here are some related projects

trash-cli

Acknowledgements

License

GPLv3

Comments
  • Configure Renovate

    Configure Renovate

    Mend Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • Cargo.toml (cargo)
    • .github/workflows/deploy.yml (github-actions)
    • .github/workflows/grcov.yml (github-actions)
    • .github/workflows/matrix.yml (github-actions)
    • .github/workflows/rust-clippy.yml (github-actions)
    • .github/workflows/rust.yml (github-actions)

    Configuration

    🔡 Renovate has detected a custom config for this PR. Feel free to ask for help if you have any doubts and would like it reviewed.

    Important: Now that this branch is edited, Renovate can't rebase it from the base branch any more. If you make changes to the base branch that could impact this onboarding PR, please merge them manually.

    What to Expect

    With your current configuration, Renovate will create 5 Pull Requests:

    Update actions-rs/toolchain digest to 88dc235
    • Schedule: ["at any time"]
    • Branch name: renovate/actions-rs-toolchain-digest
    • Merge into: main
    • Upgrade actions-rs/toolchain to 88dc2356392166efad76775c878094f4e83ff746
    Update Rust crate clap to 3.2.8
    • Schedule: ["at any time"]
    • Branch name: renovate/clap-3.x
    • Merge into: main
    • Upgrade clap to 3.2.8
    Update Rust crate clap_complete to 3.2.3
    • Schedule: ["at any time"]
    • Branch name: renovate/clap_complete-3.x
    • Merge into: main
    • Upgrade clap_complete to 3.2.3
    Update actions/checkout action to v3
    • Schedule: ["at any time"]
    • Branch name: renovate/actions-checkout-3.x
    • Merge into: main
    • Upgrade actions/checkout to v3
    Update github/codeql-action action to v2
    • Schedule: ["at any time"]
    • Branch name: renovate/github-codeql-action-2.x
    • Merge into: main
    • Upgrade github/codeql-action to v2

    🚸 Branch creation will be limited to maximum 2 per hour, so it doesn't swamp any CI resources or spam the project. See docs for prhourlylimit for details.


    ❓ Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Create LICENSE

    Create LICENSE

    Summary

    Test Plan

    What's required for testing (prerequisites)?

    What are the steps to reproduce (after prerequisites)?

    Compatibility

    | OS | Implemented | | ------- | :---------: | | iOS | ✅❌ | | Android | ✅❌ |

    Checklist

    • [ ] I have tested this on a device and a simulator
    • [ ] I added the documentation in README.md
    • [ ] I mentioned this change in CHANGELOG.md
    • [ ] I updated the typed files (TS and Flow)
    • [ ] I added a sample use of the API in the example project (example/App.js)
    opened by 0xMRTT 0
  • Update Rust crate configparser to 3.0.1

    Update Rust crate configparser to 3.0.1

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | configparser | dependencies | patch | 3.0.0 -> 3.0.1 |


    Release Notes

    QEDK/configparser-rs

    v3.0.1

    Compare Source

    What's Changed

    Full Changelog: https://github.com/QEDK/configparser-rs/compare/v3.0.0...v3.0.1


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate chrono to 0.4.22

    Update Rust crate chrono to 0.4.22

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | chrono | dependencies | patch | 0.4.19 -> 0.4.22 |


    Release Notes

    chronotope/chrono

    v0.4.22

    Compare Source

    Unfortunately the introduction of the iana-time-zone dependency in 0.4.21 caused some new regressions with lesser known platforms. This release fixes all of the issues we've encountered, improving the situation on some WebAssembly targets, SGX and on macOS/iOS. We've improved our CI setup to hopefully catch more of these issues before release in the future.

    • Make wasm-bindgen optional on wasm32-unknown-unknown target (#​771)
    • Avoid iana-time-zone dependency on x86_64-fortanix-unknown-sgx (#​767, thanks to @​trevor-crypto)
    • Update iana-time-zone version to 0.1.44 to avoid cyclic dependencies (#​773, thanks to @​Kijewski for the upstream PRs)
    • Clarify documentation about year range in formatting/parsing (#​765)

    v0.4.21

    Compare Source

    0.4.21 is a bugfix release that mainly fixes one regression from 0.4.20:

    • Fall back to UTC in case no timezone is found. Unfortunately this is a regression from the changes we made in 0.4.20 where we now parse the timezone database ourselves. Before 0.4.20, TimeZone::now() fell back to UTC in the case it could not find the current timezone, but the new implementation panicked in that case.
    • Correctly detect timezone on Android (also #​756). Android does have the timezone database installed, but it's in a different path, and it does not use /etc/localtime to keep track of the current timezone. Instead we now use the iana-time-zone crate as a dependency, since it already has quite a bit of logic for finding the current timezone on a host of platforms.

    Additionally, there is a documentation fix that reverts an incorrect guarantee:

    • Document that %Y can have a negative value, both in formatting and in parsing (#​760, thanks to @​alex)

    v0.4.20

    Compare Source

    chrono is a date and time library for Rust and 0.4.20 is the first chrono release since Sep 2020. There has been a long hiatus since the previous maintainer was no longer able to spend much time on the crate; thanks to @​quodlibetor for their stewardship of the chrono crate for many years! The new maintainers are @​djc and @​esheppa. Our first priority has been fixing the soundness issues with calls to localtime_r() as first reported in #​499 and the RUSTSEC-2020-0159 advisory. In order to do this we adapted code from the tz-rs crate maintained by @​x-hgg-x for use within chrono -- thanks for working on that! With the new implementation, chrono uses safe Rust code to parse the timezone data files on Unix platforms directly instead of relying on libc.

    Due to compatibility reasons, this release does not yet remove the time 0.1 dependency, though chrono 0.4.20 does not depend on the vulnerable parts of the time 0.1.x versions. In a future 0.5 release, we will remove the time dependency.

    The minimum supported Rust version for 0.4.20 is 1.32.0, which is intentionally still quite conservative. If you are using chrono 0.4 with a Rust version older than 1.52, we'd like to hear from you since we'd like to further modernize the code base to ease maintenance.

    Fixes

    Additions

    Non-functional improvements


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update github/codeql-action action to v2

    Update github/codeql-action action to v2

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github/codeql-action | action | major | v1 -> v2 |


    Release Notes

    github/codeql-action

    v2

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update actions/checkout action to v3

    Update actions/checkout action to v3

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | actions/checkout | action | major | v2 -> v3 | | actions/checkout | action | major | v1 -> v3 |


    Release Notes

    actions/checkout

    v3

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate clap_complete to 3.2.4

    Update Rust crate clap_complete to 3.2.4

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | clap_complete | dependencies | patch | 3.2.2 -> 3.2.4 |


    Release Notes

    clap-rs/clap

    v3.2.4

    Compare Source

    Fixes
    • (derive) Provide more clearer deprecation messages for #[clap(parse)] attribute (#​3832)

    v3.2.3

    Compare Source

    Fixes
    • Moved deprecations to be behind the deprecated Cargo.toml feature (#​3830)
      • For now, it is disabled by default though we are considering enabling it by default as we release the next major version to help draw attention to the deprecation migration path

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    Edited/Blocked

    These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

    Detected dependencies

    cargo
    Cargo.toml
    • clap 3.2.6
    • clap_complete 3.2.2
    • anyhow 1.0
    • dirs 4.0.0
    • chrono 0.4.19
    • fs_extra 1.2.0
    • clap-verbosity-flag 1.0.1
    • env_logger 0.9.0
    • log 0.4.17
    • configparser 3.0.0
    github-actions
    .github/workflows/deploy.yml
    • actions/checkout v2
    .github/workflows/grcov.yml
    • actions/checkout v1
    • actions-rs/toolchain v1
    • actions-rs/cargo v1
    • actions-rs/grcov v0.1
    .github/workflows/matrix.yml
    • actions/checkout v2
    • actions-rs/toolchain v1
    • actions-rs/cargo v1
    • actions-rs/cargo v1
    .github/workflows/rust-clippy.yml
    • actions/checkout v2
    • actions-rs/toolchain 16499b5e05bf2e26879000db0c1d13f7e13fa3af
    • github/codeql-action v1
    .github/workflows/rust.yml
    • actions/checkout v3

    • [ ] Check this box to trigger a request for Renovate to run again on this repository
    opened by renovate[bot] 0
Rmt - similar to the rm command, but it allows me to save the deleted elements in the trash

Rmt is similar to the rm command but saves the deleted elements in the trash and restores them. Rmt is written in Rust ??

Amine Zouitine 255 Jan 3, 2023
A trash-cli copy, but this time in Rust.

trash-rs A trash-cli copy, but this time in Rust. TODO Deletion Relative paths * functionality List files Include in Metadata: Original directory Date

null 1 Nov 23, 2021
A silly program written in Rust to output nonsensical sentences in the command line interface.

A silly program written in Rust to output nonsensical sentences in the command line interface.

Rachael Ava 1 Dec 13, 2021
A standalone Command Line Interface debugging tool for The Witcher 3 written in Rust

A standalone Command Line Interface debugging tool for The Witcher 3 written in Rust. This tool is intended for Witcher 3 modders who make mainly scri

Przemysław Cedro 5 Apr 20, 2022
Command-line program to manage PS battle logs. WIP.

psbattletools psbattletools is a command-line tool written in Rust for manipulating Pokémon Showdown battle logs. Installation psbattletools currently

Annika 2 Dec 27, 2022
Small command-line tool to switch monitor inputs from command line

swmon Small command-line tool to switch monitor inputs from command line Installation git clone https://github.com/cr1901/swmon cargo install --path .

William D. Jones 5 Aug 20, 2022
Low-level Rust library for implementing terminal command line interface, like in embedded systems.

Terminal CLI Need to build an interactive command prompt, with commands, properties and with full autocomplete? This is for you. Example, output only

HashMismatch 47 Nov 25, 2022
A command line interface meant to bridge the gap between Rust and shell scripting

clawbang A command line interface meant to bridge the gap between Rust and shell scripting. Intended for use with HEREDOCs and shebangs: $ clawbang <<

Chris Dickinson 52 Mar 25, 2022
Crunch is a command-line interface (CLI) to claim staking rewards every X hours for Substrate-based chains

crunch · crunch is a command-line interface (CLI) to claim staking rewards every X hours for Substrate-based chains. Why use crunch To automate payout

null 39 Dec 8, 2022
Command line interface for Solana Metaplex programs.

Metaplex Command Line Interface This is a command line interface for creating and managing non-fungible tokens on the Solana blockchain through the Me

Caleb Everett 26 Jul 12, 2022
Railway CLI - This is the command line interface for Railway.

Railway CLI This is the command line interface for Railway. Use it to connect your code to Railways infrastructure without needing to worry about envi

Nebula 4 Mar 20, 2022
Command line interface as a function.

Command line interface as a function. fncmd fncmd is an opinionated command line parser frontend that wraps around clap. The functionality is mostly i

Yu Shimura 67 Dec 7, 2022
Scouty is a command-line interface (CLI) to keep an eye on substrate-based chains and hook things up

scouty is a command-line interface (CLI) to keep an eye on substrate-based chains and hook things up

TurboFlakes 15 Aug 6, 2022
Gix is a command-line interface (CLI) to access git repositories

gix is a command-line interface (CLI) to access git repositories. It's written to optimize the user-experience, and perform as good or better than the

Sebastian Thiel 5.2k Jan 5, 2023
The official command-line interface for the makedeb Package Repository

mpr-cli This is the repository for the MPR CLI, the official command-line interface for the makedeb Package Repository. Installation Users have a few

makedeb 38 Jan 2, 2023
A command-line interface for Trane

trane-cli This repository contains the code for the command-line interface to Trane. Documentation The latest documentation for trane-cli can be found

The Trane Project 25 Sep 25, 2022
Command-line interface to Microsoft To Do

⚠ This is a hackathon project with no official support or quality guarantee Hackathon 2022 tdi The command-line interface, for some, is the natural wa

Microsoft Hackathons 5 Oct 26, 2022
The awesome-app Command Line Interface

Rust CLI to create Awesome Applications with Rust. More info at awesomeapp.org Install > cargo install awesome-app Create your first app: # Create you

RUST-AWESOME-APP 41 Jan 4, 2023
This is a simple command-line interface tool that allows you to interact with ChatGPT from OpenAI or Azure.

HeyGPT This is a simple command-line interface tool that allows you to interact with ChatGPT from OpenAI or Azure. You can use it to: Chat with ChatGP

Philip 5 Mar 28, 2023