Giter Site home page Giter Site logo

ls-git's Introduction

ls-git

Do you find it annoying/verbose to figure out the status of files in your git repositories when using a terminal? If so, then ls-git is here to come to your rescue!

Designed to be a fast and effective union of ls and git status, this script allows you to see the status of files and directories in your repository in way that is both familiar and useful.

Symbol For Files For Directories
[ ] The file is up-to-date. Files in the directory are up-to-date.
[~] The file was modified or renamed. The directory has one or more modified, added, or renamed files.
[+] The file was added. N/A
[i] The file is ignored. All files in the directory are ignored.
[?] The file is untracked. The directory has one or more untracked files.

Warnings

  • This software is pre-alpha.
    As much as I would like to, I unfortunately cannot guarantee it will work for you.
    If you come across a bug or issue, please help out and report it.

  • This software does not automatically update.
    If something is broken, please try and re-install ls-git to see if it was fixed in the latest version.

Compatibility

Due to the complexity of ls, not all command-line switches are supported.

See here for a full compatibility list.

Requirements

In order to use ls-git, the following requirements must be met:

Programs:

  • git
  • tput
  • perl

Perl Modules:

  • Time::Moment
  • Math::Round

Installation

git clone 'https://github.com/eth-p/ls-git.git'
cd ls-git
./install --deps --to ~/.bin

This will install all required Perl modules, and save ls-git to ~/.bin/ls-git.

Updates

./install --update

ls-git's People

Contributors

eth-p avatar

Stargazers

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

Watchers

 avatar  avatar

Forkers

derrickstolee

ls-git's Issues

Archlinux package

Hi,

I'd like to have an AUR package for this project, I think once it's been created it would basically never have to be modified again (except for version changes), so it would be pretty low maintenance.

Thanks!

Compatibility: LS_COLORS

Support for the LS_COLORS environment variable should be added. This will be needed to have the output more closely match the real ls color scheme.

Compatibility

I'm basing this on the MacOS version of ls for now.

Flags:

  • -@ Display extended attribute keys and sizes in long (-l) output.

  • -1 Force output to be one entry per line. This is the default when output is not to a terminal.

  • -A List all entries except for . and ... Always set for the super-user.

  • -a Include directory entries whose names begin with a dot (.).

  • -B Force printing of non-printable characters (as defined by ctype(3) and current locale settings) in file names as \xxx, where xxx is the numeric value of the character in octal.

  • -b As -B, but use C escape codes whenever possible.

  • -C Force multi-column output; this is the default when output is to a terminal.

  • -c Use time when file status was last changed for sorting (-t) or long printing (-l).

  • -d Directories are listed as plain files (not searched recursively).

  • -e Print the Access Control List (ACL) associated with the file, if present, in long (-l) output.

  • -F Display a slash (/') immediately after each pathname that is a directory, an asterisk (*') after each that is executable, an at sign (@') after each symbolic link, an equals sign (=') after each socket, a percent sign (%') after each whiteout, and a vertical bar (|') after each that is a FIFO.

  • -f Output is not sorted. This option turns on the -a option.
    Caveats: The "not sorted" aspect is ignored.

  • -G Enable colorized output. This option is equivalent to defining CLICOLOR in the environment.

  • -g This option is only available for compatibility with POSIX; it is used to display the group name in the long (-l) format output (the owner name is suppressed).

  • -H Symbolic links on the command line are followed. This option is assumed if none of the -F, -d, or -l options are specified.

  • -h When used with the -l option, use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte in order to reduce the number of digits to three or less using base 2 for sizes.

  • -i For each file, print the file's file serial number (inode number).

  • -k If the -s option is specified, print the file size allocation in kilobytes, not blocks. This option overrides the environment variable BLOCKSIZE.

  • -L Follow all symbolic links to final target and list the file or directory the link references rather than the link itself. This option cancels the -P option.

  • -l (The lowercase letter ``ell''.) List in long format. If the output is to a terminal, a total sum for all the file sizes is output on a line before the long listing.

  • -m Stream output format; list files across the page, separated by commas.

  • -n Display user and group IDs numerically, rather than converting to a user or group name in a long (-l) output. This option turns on the -l option.

  • -O Include the file flags in a long (-l) output.

  • -o List in long format, but omit the group id.

  • -P If argument is a symbolic link, list the link itself rather than the object the link references. This option cancels the -H and -L options.

  • -p Write a slash (`/') after each filename if that file is a directory.

  • -q Force printing of non-graphic characters in file names as the character `?'; this is the default when output is to a terminal.

  • -R Recursively list subdirectories encountered.

  • -r Reverse the order of the sort to get reverse lexicographical order or the oldest entries first (or largest files last, if combined with sort by size.

  • -S Sort files by size.

  • -s Display the number of file system blocks actually used by each file, in units of 512 bytes, where partial units are rounded up to the next integer value. If the output is to a terminal, a total sum for all the file sizes is output on a line before the listing. The environment variable BLOCKSIZE overrides the unit size of 512 bytes.

  • -T When used with the -l (lowercase letter ``ell'') option, display complete time information for the file, including month, day, hour, minute, second, and year.

  • -t Sort by time modified (most recently modified first) before sorting the operands by lexicographical order.

  • -u Use time of last access, instead of last modification of the file for sorting (-t) or long printing (-l).

  • -U Use time of file creation, instead of last modification for sorting (-t) or long output (-l).

  • -v Force unedited printing of non-graphic characters; this is the default when output is not to a terminal.

  • -W Display whiteouts when scanning directories. (-S) flag).

  • -w Force raw printing of non-printable characters. This is the default when output is not to a terminal.

  • -x The same as -C, except that the multi-column output is produced with entries sorted across, rather than down, the columns.

Datetime: Localization

The real ls command takes the LANG environment variable into consideration when formatting dates.

Locale Format
en_US 'Oct 23'
en_CA '23 Oct'

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.