Giter VIP home page Giter VIP logo

ll's Introduction

ll - a more informative ls, based on k

CI

Description

ll is an alternative to k, which was created to make directory listings more informative and readable, using colour to add visual weight to important information in the listing.

Motivation

k only works with zsh, and I've found that it can occasionally be a little slow when working with large directories or with large git repositories. I was looking for a project which would be a good match to learn/use nim, and this seemed like a great opportunity to make something a little more general-purpose that could be used without the zsh dependency.

Features

Full file listing

Calling ll provides a full file listing for a directory, similar to calling ls -l.

File weight colours

Files sizes are graded from green for small (< 1k), to red for huge (> 1mb).

Human readable files sizes can be shown by using the -h or --human flag.

"Rotting" dates

Dates fade with age, so that recently changed files/directories can be easily identified.

Broken Symlinks

Broken symlinks are identified by a ~> (tilde-arrow) leading symbol and differing colors.

Git integration

ll provides easy-to-understand information about the git status of your files/directories.

Git status on entire repos

When listing a directory which contains git repos, ll displays the active state of those repos:

Image demonstrating repository listing

Git status on files within a working tree

When listing files/directories within a working tree, ll displays the active state of each file, and the overall state for directories:

Image demonstrating file listing

Speed

ll improves on k's rendering speeds. Currently ll is comparable to ls display times when using the --no-vcs flag. Listing git repositories and trees take a little longer, but even with large listings with many git-tracked entries ll is still sub-second.

Installation

The latest binary distribution is avilable here.

It is also possible to build and install using the following instructions:

Requirements

  • Nim, minimum v1.2.*
  • make

Steps

Firstly install Nim. I personally use asdf to manage Nim versions on my machine. With asdf installed, this is as simple as calling asdf install nim latest.

Once Nim is installed, clone this repository. From within the cloned directory, call make install which will build ll into the working directory and will then opy the resulting ll binary to /usr/local/bin.

Usage

$ ll

That's it. For more options, pass -? or --help.

Status

  • Full file listing
  • File weight colours
  • "Rotting" dates
  • Display symlink status
  • Git status on entire repos
  • Git status on files within a working tree
  • Sort output by size
  • Sort output by modified time
  • Sort output in reversed order
  • Options for filtering directories
  • Remove dependency on PCRE (using the regex package)
  • Installable via Homebrew
  • Support light themes
  • Support globs

Fixes over k

  • k has an odd behaviour; given pwd is a git-tracked directory, if you k somedir where somedir contains git-tracked directories but isn't itself tracked, k reports as though it is working inside a work-tree. ll reports this as one would expect, as though pwd is somedir. UPDATE: This has now been fixed.

Future plans

According to the k source, there are future plans to colorise file permissions. If this happens, I plan to bring those changes over. If any other enhancements are added, I hope to port those also.

I'd like to display some additional information in the summary line of the listing; I'm currently reviewing what would be most useful.

Contributing

Contributions and pull-requests are always welcome, as is constructive feedback around code structure, hints, tips, etc.

If you would like to request a feature or report a bug, please add a new issue here and we'll do our best to address them. Please note that this is not a funded project and fixes will be addressed on a best-effort basis.

To contribute directly:

  1. Fork it (https://github.com/OldhamMade/ll/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new pull request

Liability

We take no responsibility for the use of this tool, or external instances provided by third parties. We strongly recommend you abide by the valid official regulations in your country. Furthermore, we refuse liability for any inappropriate or malicious use of this tool. This tool is provided to you in the spirit of free, open software.

You may view the LICENSE in which this software is provided to you here.

IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

ll's People

Contributors

oldhammade avatar sheerluck avatar solitudesf avatar t8m8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ll's Issues

Run tests on a CI system

Acceptance Criteria

  • Tests are run on a CI system when code is pushed to GitHub
  • A badge is displayed on the README showing current build status

Options to sort by time

Acceptance Criteria

  • ll understands -t for sorting by modified time
  • ll understands -U for sorting by created time

Note:

Until Nim has sub-second precision for times.Time objects on macOS, these options won't be possible to implement

Readme has no install instructions

I've never used Nim, and I'm not opposed to doing it. I just don't want to jump in to a whole language ecosystem (especially via the windows subsystem for linux) without any guidance.

Can you add instructions to the readme for installing this? Or provide a binary in your releases?

Display full details

Acceptance Criteria

  • Displays a full, sorted file listing
  • Displays the same details as ls -l

Colourise file sizes

Acceptance Criteria

  • File sizes change from green, through orange, to red as they get larger
  • File size colours match those of k

Colourise dates

Acceptance Criteria

  • Dates older than 6 months display day-month-year
  • Dates younger than 6 months display day-month-time
  • Dates are displayed darker over time
  • Date colours match those of k

Handle globs

Acceptance Criteria

  • ll understands patterns like ll *.nim

Depfu Error: No dependency files found

Hello,

We've tried to activate or update your repository on Depfu and couldn't find any supported dependency files. If we were to guess, we would say that this is not actually a project Depfu supports and has probably been activated by error.

Monorepos

Please note that Depfu currently only searches for your dependency files in the root folder. We do support monorepos and non-root files, but don't auto-detect them. If that's the case with this repo, please send us a quick email with the folder you want Depfu to work on and we'll set it up right away!

How to deactivate the project

  • Go to the Settings page of either your own account or the organization you've used
  • Go to "Installed Integrations"
  • Click the "Configure" button on the Depfu integration
  • Remove this repo (OldhamMade/ll) from the list of accessible repos.

Please note that using the "All Repositories" setting doesn't make a lot of sense with Depfu.

If you think that this is a mistake

Please let us know by sending an email to [email protected].


This is an automated issue by Depfu. You're getting it because someone configured Depfu to automatically update dependencies on this project.

Add sorting options

Acceptance Criteria

  • ll understands -S for sorting by size
  • ll understands -r for reversing the order of sorting

Columns not displaying correctly

Issue

Columns aren't being displayed correctly, for example when there are multiple values for user/group the columns aren't padded to the maximum length

Display better summary details

Acceptance Criteria

  • a new flag exists to show enhanced summary information
  • enhanced summary contains:
    • full present working directory
    • total files
    • total dirs
    • total hidden

Workflows are referencing vulnerable actions

Hello, there!

As part of the university research we are currently doing regarding the security of Github Actions, we noticed that one or many of the workflows that are part of this repository are referencing vulnerable versions of the third-party actions. As part of a disclosure process, we decided to open issues to notify GitHub Community.

Please note that there are could be some false positives in our methodology, thus not all of the open issues could be valid. If that is the case, please let us know, so that we can improve on our approach. You can contact me directly using an email: ikoishy [at] ncsu.edu

Thanks in advance

  1. The workflow release.yml is referencing action gittools/actions/gitversion/setup using references v0.9.6. However this reference is missing the commit 90150b4 which may contain fix to the vulnerability.
  2. The workflow release.yml is referencing action gittools/actions/gitversion/execute using references v0.9.6. However this reference is missing the commit 90150b4 which may contain fix to the vulnerability.

The vulnerability fix that is missing by actions' versions could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider updating the reference to the action.

If you end up updating the reference, please let us know. We need the stats for the paper :-)

Display a simple directory listing

Acceptance Criteria:

  • Displays a list of filenames for a given path
  • The list displayed may be unordered
  • This list should not provide any further details at this time

Filter directories

Acceptance Criteria

  • using the -d flag lists only directories, filtering out files
  • using the -D flag lists only files, filtering out directories

Handle light themes

Acceptance Criteria

  • ll uses a $LL_THEME="light|dark" env var to change colors

Display full details

Acceptance Criteria

  • Displays a full, sorted file listing
  • Displays the same details as ls -l

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.