Git Product home page Git Product logo

dstrap.cr's Introduction

dstrap

dstrap is a simple script made to get the most useful information about your current working directory. Made with Crystal for Linux systems, it's the perfect supplement to commands like ls -a.

Installation:

To install and build the latest version of dstrap, navigate to your home directory and create a bin/ folder:

cd ~
mkdir -p bin && cd bin

Move to the bin folder and copy the following installation script:

wget -O dstrap.cr https://raw.githubusercontent.com/frissyn/dstrap.cr/main/dstrap.cr
crystal build dstrap.cr -o dstrap --release --no-debug --progress
rm dstrap.cr && chmod +x ./dstrap

Then add the compiled exectable to $PATH:

export PATH="$PATH:/home/$USER/bin"

And that's all! Call the command dstrap from anywhere and enjoy! ๐ŸŽ‰

image

dstrap.cr's People

Contributors

frissyn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

fishnibble

dstrap.cr's Issues

some notes (bug & idea)

hi frissyn, its zplusfour
I just found a bug, and I wanna give you some idea :)

Bug:

look here:
image

this is a directory, and it has a file icon, can you please fix that?

Idea:

the idea is: use the ARGV variable, the ARGV variable is the cli (crystal executable) 's arguments, it has the Array type
like for example create a function that lists the files in a dir:

def list_dir(__dirname)
  # do something...
end

and then use the ARGV variable to list the dir:

# idk how to calculate the array length in Crystal (is it like ruby? .length() ?)
if ARGV.length() == 0 do
  list_dir('.')
else
  list_dir(ARGV[0])
end

# I hope you understand the code :)

this is better than only listing the parent and the current directory.
however, ima try to create a pull request to make these changes, idk bc idk how to calculate the length of an array lol :D

but anyway, good job on this project :)

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.