Giter VIP home page Giter VIP logo

try's Introduction

try

try logo

"Do, or do not. There is no try."

We're setting out to change that.

Description

try lets you run a command inside an overlay without modifying the state of the filesystem. While using try you can choose to commit the result to the filesystem or completely ignore it without any side-effect to the main file system.

Getting Started

Dependencies

  • Ubuntu 18.04 LTS or later

Installing

Clone this repository:

git clone https://github.com/binpash/try.git

Optionally, consider adding the try directory to PATH.

echo 'export PATH="<path_to_try_directory>:$PATH"' >> ~/.bashrc

Example Usage

The general workflow is to try a command before commiting its results to your workspace.

To uncompress a gzip file, you can invoke try as follows:

try gunzip file.txt.gz

By default, try will ask you to commit the changes made at the end of its execution.

Changes detected in the following files:

/tmp/tmp.0caZdxnHuR/upperdir/home/me/file.txt
/tmp/tmp.0caZdxnHuR/upperdir/home/me/file.txt.gz

Commit these changes? [y/N] y

Sometimes, you might want to pre-execute a command and commit its result at a later time. Invoking try with the -n flag will return the overlay directory, wothout committing the result.

try -n gunzip file.txt.gz

Alternatively, you can specify your own overlay directory as follows (note that try_dir already exists):

try -D try_dir gunzip file.txt.gz

You can inspect the changhes made inside a given overlay directory:

try summary try_dir

You can also choose to commit the overlay directory contents:

try commit try_dir

Version History

  • 0.1
    • Initial Release

License

This project is licensed under the MIT License - see LICENSE.md for details.

Copyright (c) 2023 The PaSh Authors.

try's People

Contributors

angelhof avatar ericzty avatar gliargovas avatar mgree avatar

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.