Coder Social home page Coder Social logo

selfmadeselfpaidx / lsx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from souvikinator/lsx

0.0 0.0 0.0 9.76 MB

ls Xtended : A command line utility that lets you navigate through terminal like a pro ๐Ÿ˜Ž.

License: MIT License

Shell 16.59% Go 83.41%

lsx's Introduction


lsx

Navigate through terminal like a pro ๐Ÿ˜Ž

license codebeat badge go report card

๐Ÿ’ป Demo โ€ข โš—๏ธ Install & Update โ€ข ๐Ÿœ Contribution โ€ข โ—Known Issues

โ“ Why?

It's a pain to cd and ls multiple times to reach desired directory in terminal (this maybe subjective). ls-Xtended (lsx) solves this problem by allowing users to smoothly navigate and search directories on the go with just one command. It also allows to create alias for paths making it easier for users to remember the path to the desired directory.

It also ranks your directories based on how often you access them and placing them on top of the list to reduce searching and navigation time.

๐Ÿ’ป Demo

Note: once you reach the desired destination, use ctr+c to exit and stay in the desired destination

Navigate through terminal and perform search:

  • use / to trigger search and start typing to search
lsx

Show hidden files as well

lsx -a

Set alias for directory paths

lsx set-alias -n somealias -p path/to/be/aliased

or

lsx set-alias --path-name somealias --path path/to/be/aliased

Updating Alias

set-alias can also be used to update any existing alias. Let's say alias abc already exists for path a/b/c. on can update it like so:

lsx set-alias -n abc -p d/e/f

List alias created by user

lsx alias

Use alias

lsx somealias

Remove existing alias

lsx remove-alias aliasname

โš—๏ธ Install

โš ๏ธ make sure:

  • Must have Go installed
  • GOPATH is set and $GOPATH/bin is added to PATH

Run following command

curl https://raw.githubusercontent.com/souvikinator/lsx/master/install.sh | bash

and you are ready to go, restart your terminal. Enjoy!

Note: zsh, bash and fish shell users just need to run the installation script and lsx will be ready to use. In case the command is not working add following line at the end of your shell resource file (.bashrc, .zshrc...):

source ~/.config/lsx/lsx.sh

and then restart your terminal

open an issue if still facing installation problems

How to update?

running the command used for installing updates lsx

restart your terminal and you are good to go.

๐Ÿœ Contribution

You can improve this project by contributing in following ways:

  • report bugs
  • fix issues
  • request features
  • asking questions (just open an issue)

and any other way if not mentioned here.

โ—Known Issues

As of now the installation process is painful and the reason is a program runs as a child process in a terminal so eveything happens withing that child process. When we change the directory from go program the directory changes for that executable or to be specific "for that child process" and not of the shell. Which is why one needs to source a script in their shell resource file (.zshrc, .bashrc...).

The script contains a bash function as a wrapper around the lsx binary to make the whole cd thing work. This is what is prevent lsx to be distributed using some package manager.

If anyone can comeup with something then feel free to open issue.

lsx's People

Contributors

souvikinator avatar itslychee avatar yeraze avatar uzaxirr avatar deepsourcebot avatar herbygillot avatar croissong avatar pk-cod3ch3mist avatar wineee 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.