Giter Club home page Giter Club logo

cli_utils_rs's Introduction

cli-utils-rs

My rewrite of basic cli utilities using Rust

cli_utils_rs's People

Contributors

jorge-cab avatar

Watchers

 avatar

cli_utils_rs's Issues

Implement `cat`

As a user, I want to display the contents of a file so that I can read it in the terminal.

Ex:

cat ./story.txt

Out -> "Once upon a time..."

Test reading from a file, handling of non-existent files, and empty files.

Add missing unit tests for `cat`

After #6 now make the unit tests for cat this might involve refactoring some of the code to make it viable and achieve as much code coverage as possible.

Implement most basic grep logic

Make grep be able to search in a certain file a certain string.

Ex:
grep Title ./books
-> Title1

grep hello ./greetings
-> hello there

Implement `ls`

As a user, I want to list the files in a directory so that I can see what it contains.

Ex:

ls
-> Myfile1.txt bin hello.txt

Test listing files

Command selector logic

The user can now select the util they want to use. It will be the first argument.

Ex:

cargo run echo asdf

out: asdf

cargo run grep asdf

-> executes grep logic

add unit tests

Make the basic `echo` logic

To start off the project when running cargo run we should be able to handle:

  1. Basic Output
    Given: echo asdf
    Then: asdf
  2. Quoted String
    Given: echo "asdf"
    Then: asdf

Acceptance Criteria

  • The above works as defined
  • Unit tests

Refactor to use custom error type

Refactor to use a custom error type in general in the rewrite to give us more flexibility and robustness with Error handling.

Implement at least the following types:

  • MissingFilePath
  • FileReadError
  • InvalidCommand
  • NoArgumentsReceived

Confirm tests are still working

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.