25 Commits
Author SHA1 Message Date
Yash-Handa f6f6bee415 minor fixes 2020-09-16 20:01:48 +05:30
Yash-Handa 8be883a8de Added go get and Build from Source to README.md 2020-09-16 18:05:24 +05:30
Yash-Handa 3548235135 fixed a bug on list of very long file names 2020-09-16 17:16:33 +05:30
Yash-Handa e7baa8cbbd Added go.mod to .github dir 2020-09-16 13:47:41 +05:30
Yash-Handa 916334088e bumped up version to 1.3.4 2020-09-10 15:13:51 +05:30
Yash-Handa fc190fe213 Updated some images 2020-09-10 15:04:53 +05:30
Yash-Handa 325ede6a51 Added images to README.md 2020-09-10 14:40:27 +05:30
Yash-Handa 8476463bd1 added synopsis to ctw 2020-09-10 13:32:23 +05:30
Yash-Handa 66065a3e1c Add 14 linux based icons 2020-09-10 13:24:05 +05:30
Yash-Handa c6ef105c5c added some emojies to README.md 2020-09-10 12:03:04 +05:30
Yash HandaandGitHub 6ed2b350c8 Update README.md 2020-09-10 11:53:29 +05:30
Yash-Handa f8d272d2c4 Added other sections to README.md 2020-09-10 11:39:43 +05:30
Yash-Handa b93c27db79 Added TOC link to sections of README.md 2020-09-10 08:14:10 +05:30
Yash-Handa 01424c6d9d added Installation Section to README.md 2020-09-10 08:08:34 +05:30
Yash HandaandGitHub ead801831f Merge pull request #2 from Yash-Handa/add-code-of-conduct-1
Create CODE_OF_CONDUCT.md
2020-09-09 11:04:29 +05:30
Yash HandaandGitHub 1041ec04a5 Create CODE_OF_CONDUCT.md 2020-09-09 11:03:36 +05:30
Yash-Handa 830934334c Added basic structure to README.md. 2020-09-09 11:00:17 +05:30
Yash-Handa 2462e8de10 Added some Badges to README.md 2020-09-09 07:00:28 +05:30
Yash-Handa 601e3567d7 Updated the man page to current version 2020-09-09 01:25:45 +05:30
Yash-Handa 13a45eb843 Updated pre-commit hook for help2man 2020-09-09 01:23:31 +05:30
Yash-Handa e0b7546408 Bumped up version to 1.3.3 2020-09-09 01:20:54 +05:30
Yash-Handa 1b719af25b removed pre-push git hook in favour of goreleaser 2020-09-09 01:18:48 +05:30
Yash-Handa 8606cb53e0 Added .deb and .rpm packages 2020-09-09 01:17:30 +05:30
Yash-Handa 7e1e31f87f Integrated goreleaser with github 2020-09-08 23:44:38 +05:30
Yash-Handa 8f2e99cccd Updated gorelease pipeline 2020-09-08 23:11:52 +05:30
33 changed files with 590 additions and 84 deletions
+2 -2
View File
@@ -10,8 +10,8 @@ echo -e "\`\`\`" >> HELP.md
exec git add HELP.md
# Update logo-ls.1.gz
help2man -N -I logo-ls.h2m -o logo-ls.1 ./logo-ls
gzip -f logo-ls.1
exec help2man -N -I logo-ls.h2m -o logo-ls.1 ./logo-ls
exec gzip -f logo-ls.1
exec git add logo-ls.1.gz
exit 0
+35 -35
View File
@@ -1,43 +1,43 @@
#!/bin/sh
# #!/bin/sh
R_NAME=$1
R_URL=$2
# R_NAME=$1
# R_URL=$2
error_exit()
{
if [ "$?" != "0" ]; then
nl=$'\n'
echo "$1""$nl""$2""$nl""$nl""Aborting push to ""$R_NAME"" (""$R_URL"")" 1>&2
exit 1
fi
}
# error_exit()
# {
# if [ "$?" != "0" ]; then
# nl=$'\n'
# echo "$1""$nl""$2""$nl""$nl""Aborting push to ""$R_NAME"" (""$R_URL"")" 1>&2
# exit 1
# fi
# }
# Build binary for variety of arch
# linux amd64
ERROR=$(go env -w GOOS=linux GOARCH=amd64 2>&1 > /dev/null)
error_exit "Cannot set GOOS=linux and GOARCH=amd64:" "$ERROR"
ERROR=$(go build -o build/logo-ls-linux-amd64 2>&1 > /dev/null)
error_exit "Cannot build logo-ls-linux-amd64:" "$ERROR"
# # Build binary for variety of arch
# # linux amd64
# ERROR=$(go env -w GOOS=linux GOARCH=amd64 2>&1 > /dev/null)
# error_exit "Cannot set GOOS=linux and GOARCH=amd64:" "$ERROR"
# ERROR=$(go build -o build/logo-ls-linux-amd64 2>&1 > /dev/null)
# error_exit "Cannot build logo-ls-linux-amd64:" "$ERROR"
# linux arm64
ERROR=$(go env -w GOOS=linux GOARCH=arm64 2>&1 > /dev/null)
error_exit "Cannot set GOOS=linux and GOARCH=arm64:" "$ERROR"
ERROR=$(go build -o build/logo-ls-linux-arm64 2>&1 > /dev/null)
error_exit "Cannot build logo-ls-linux-arm64:" "$ERROR"
# # linux arm64
# ERROR=$(go env -w GOOS=linux GOARCH=arm64 2>&1 > /dev/null)
# error_exit "Cannot set GOOS=linux and GOARCH=arm64:" "$ERROR"
# ERROR=$(go build -o build/logo-ls-linux-arm64 2>&1 > /dev/null)
# error_exit "Cannot build logo-ls-linux-arm64:" "$ERROR"
# linux 386
ERROR=$(go env -w GOOS=linux GOARCH=386 2>&1 > /dev/null)
error_exit "Cannot set GOOS=linux and GOARCH=386:" "$ERROR"
ERROR=$(go build -o build/logo-ls-linux-386 2>&1 > /dev/null)
error_exit "Cannot build logo-ls-linux-386:" "$ERROR"
# # linux 386
# ERROR=$(go env -w GOOS=linux GOARCH=386 2>&1 > /dev/null)
# error_exit "Cannot set GOOS=linux and GOARCH=386:" "$ERROR"
# ERROR=$(go build -o build/logo-ls-linux-386 2>&1 > /dev/null)
# error_exit "Cannot build logo-ls-linux-386:" "$ERROR"
# darwin amd64
ERROR=$(go env -w GOOS=darwin GOARCH=amd64 2>&1 > /dev/null)
error_exit "Cannot set GOOS=darwin and GOARCH=amd64:" "$ERROR"
ERROR=$(go build -o build/logo-ls-darwin-amd64 2>&1 > /dev/null)
error_exit "Cannot build logo-ls-darwin-amd64:" "$ERROR"
# # darwin amd64
# ERROR=$(go env -w GOOS=darwin GOARCH=amd64 2>&1 > /dev/null)
# error_exit "Cannot set GOOS=darwin and GOARCH=amd64:" "$ERROR"
# ERROR=$(go build -o build/logo-ls-darwin-amd64 2>&1 > /dev/null)
# error_exit "Cannot build logo-ls-darwin-amd64:" "$ERROR"
# reset env to default
go env -u GOOS GOARCH
# # reset env to default
# go env -u GOOS GOARCH
exit 0
# exit 0
+1
View File
@@ -0,0 +1 @@
// An empty go.mod file to refrain this dir to be distributed with the cli tool
Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 50 KiB

+2 -1
View File
@@ -22,4 +22,5 @@ build/
dist
# env stuff
*.env
*.env
.gh_token
+24 -1
View File
@@ -2,7 +2,7 @@
# Make sure to check the documentation at http://goreleaser.com
env_files:
github_token: .gh_token.env
github_token: ~/Projects/Golang_Stuff/logo-ls/.gh_token
project_name: logo-ls
@@ -66,6 +66,10 @@ signs:
args: ["-u", "0xD9498B225223344C0205FDF528182066BCACCCB2", "--output", "${signature}", "--detach-sign", "${artifact}"]
artifacts: checksum
release:
github:
owner: Yash-Handa
name: logo-ls
snapshot:
name_template: "{{ .Tag }}-next"
@@ -76,3 +80,22 @@ changelog:
exclude:
- '^docs:'
- '^test:'
- '(?i)update Readme.md'
nfpms:
-
file_name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
package_name: logo-ls
homepage: https://github.com/Yash-Handa/logo-ls
description: ls command with icons and git integration. Written in Golang
maintainer: Yash Handa <yashhanda7@yahoo.com>
license: MIT
formats:
- deb
- rpm
dependencies:
- git
recommends:
- golang
files:
"logo-ls.1.gz": "/usr/share/man/man1/logo-ls.1.gz"
+76
View File
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at yashhanda7@yahoo.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
+417 -43
View File
@@ -8,14 +8,390 @@
![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/Yash-Handa/logo-ls?sort=semver&style=flat-square)
![PRs](https://img.shields.io/badge/PRs-welcome-56cc14?style=flat-square)
[![HitCount](http://hits.dwyl.com/{Yash-Handa}/{logo-ls}.svg)](http://hits.dwyl.com/{Yash-Handa}/{logo-ls})
![deb](https://img.shields.io/badge/-Deb%20Package-A81D33?style=flat-square&logo=Debian&link=https://github.com/Yash-Handa/logo-ls/releases/)
![rpm](https://img.shields.io/badge/-RPM%20Package-EE0000?style=flat-square&logo=Red-Hat&link=https://github.com/Yash-Handa/logo-ls/releases/)
![linux](https://img.shields.io/badge/-Linux%20Binary-FCC624?style=flat-square&logo=Linux&logoColor=000000&link=https://github.com/Yash-Handa/logo-ls/releases/)
![apple](https://img.shields.io/badge/-Darwin%20Binary-999999?style=flat-square&logo=Apple&logoColor=ffffff&link=https://github.com/Yash-Handa/logo-ls/releases/)
modern ls command with vscode like file logos. Written in Golang
modern ls command with beautiful Icons and Git Integrations . Written in Golang
<div>
<span align="center">
<img alt="logo-ls" title="logo-ls" src="/.github/images/ls.png">
</span>
</div><br>
Command and Arguments supported are listed in [HELP.md](/HELP.md)
## Check the downloaded Resource
## Table of contents
receive public key of the signing party
- [Features](#features)
- [Usage](#usage)
- [Flags](#flags)
- `-1`
- `-a` (or) `--all`
- `-A` (or) `--almost-all`
- `-D` (or) `--git-status`
- `-l`, `-o`, `-g`, `-G`
- `-R` (or) `--recursive`
- `-?` (or) `--help`
- Sorting:
- `-t`, `-S`, `-X`, `-U`, `-v` and `-r` (`--reverse`)
- `-T` (or) `--time-style=value`
- `-i` (or) `--disable-icon`
- `-c` (or) `--disable-color`
- [Combination of flags](#combination-of-flags)
- [Multiple Files and Directories](#multiple-files-and-directories)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Debian (.deb package)](#debian-deb-package)
- [Red Hat (.rpm package)](#red-hat-rpm-package)
- [MacOS (Darwin)](#macos-darwin)
- [Linux](#linux)
- [go get](#go-get)
- [Build from Source](#build-from-source)
- [Check the downloaded Resource](#check-the-downloaded-resource)
- [Recommended configurations](#recommended-configurations)
- [Updating](#updating)
- [Icon Set](#icon-set)
- [Contributing](#contributing)
- [License](#license)
## Features
[:arrow_up: TOC](#table-of-contents)
This project is build to add esthetics to ls(coreutiles) command
- Over 250+ icons :sunglasses:
- Supporting 600+ files, extensions and directories
- 16 Million, true colors supported
- Git Status Integration
- :racehorse: Near native speed. (thanks to Golang)
- Language agnostic binaries
This project is highly inspired by [ls(coreutiles)](https://www.gnu.org/software/coreutils/manual/html_node/ls-invocation.html#ls-invocation) and [color ls](https://github.com/athityakumar/colorls). The project tries to find a happy path between speed and aesthetics.
## Usage
[:arrow_up: TOC](#table-of-contents)
All supported flags can be found by using help flag `$ logo-ls -?`. The same has been provided as [HELP.md](/HELP.md).
The project also has its manpage which can be accessed by `man logo-ls`
### Flags
Almost all flags are same as that of the classic ls command and behave similarly. The project can be used as a drop-in replacement for the ls(coreutiles)
- With `-1`: List one entry per line
<div>
<span align="center">
<img alt="logo-ls -1" title="logo-ls -1" src="/.github/images/ls-1.png">
</span>
</div><br>
- With `-a` (or) `--all` : Does not ignore entries starting with '.'
<div>
<span align="center">
<img alt="logo-ls -a" title="logo-ls -a" src="/.github/images/ls-a.png">
</span>
</div><br>
- With `-A` (or) `--almost-all` : Does not ignore entries starting with '.', except `./` and `../`
<div>
<span align="center">
<img alt="logo-ls -A" title="logo-ls -A" src="/.github/images/ls-A.png">
</span>
</div><br>
- With `-D` (or) `--git-status`: Add Git Status to the listed Files and Directory
- *Note*: As much I would love to make this the default behavior of the command but showing git status is an intensive task and may slow (a tiny bit) the command itself. If you want you can make alias to the command with `-D` applied to it.
<div>
<span align="center">
<img alt="logo-ls -D" title="logo-ls -D" src="/.github/images/ls-D.png">
</span>
</div><br>
- With `-l`: Shows in long listing format
other similar commands are:
- `-o`: like `-l`, but do not list group information
- `-g`: like `-l`, but do not list owner
- `-G` (or) `--no-group`: in a long listing, don't print group names
<div>
<span align="center">
<img alt="logo-ls -l" title="logo-ls -l" src="/.github/images/ls-l.png">
</span>
</div><br>
- With `-R` (or) `--recursive`: list subdirectories recursively
<div>
<span align="center">
<img alt="logo-ls -R" title="logo-ls -R" src="/.github/images/ls-R.png">
</span>
</div><br>
- With `-?` (or) `--help`: print the help message
- similar message can be found at [HELP.md](/HELP.md).
<div>
<span align="center">
<img alt="logo-ls -?" title="logo-ls -?" src="/.github/images/ls-h.png">
</span>
</div><br>
- **Sorting**: There are many sorting flags available [default is *alphabetic order*]
- With `-t`: sort by modification time, newest first
- With `-S`: sort by file size, largest first
- With `-X`: sort alphabetically by entry extension
- With `-U`: do not sort; list entries in directory order
- With `-v`: natural sort of (version) numbers within text
- With `-r` (or) `-reverse`: reverse order while sorting
<div>
<span align="center">
<img alt="logo-ls -X" title="logo-ls -X" src="/.github/images/ls-X.png">
</span>
</div><br>
- With `-T` (or) `--time-style=value`: set time/date format in long formats (`-l`, `-o`, `-g`). There are many options to chose from all are listed in [HELP.md](/HELP.md).
<div>
<span align="center">
<img alt="logo-ls -T" title="logo-ls -T" src="/.github/images/ls-T.png">
</span>
</div><br>
- With `-i` (or) `--disable-icon`: don't print icons of the files
<div>
<span align="center">
<img alt="logo-ls -i" title="logo-ls -i" src="/.github/images/ls-i.png">
</span>
</div><br>
- With `-c` (or) `--disable-color`: don't color icons, filenames and git status
- *Note*: use a combination of `-ic` to print output to a file `$ logo-ls -ic > t.txt`
<div>
<span align="center">
<img alt="logo-ls -c" title="logo-ls -c" src="/.github/images/ls-c.png">
</span>
</div><br>
For all available commands see manpage or [HELP.md](/HELP.md)
### Combination of flags
This project uses [getopt](https://github.com/pborman/getopt) which is a golang variant of the classic getopt utility used in ls(coreutiles). Thus any combination of flags are possible and can be used.
<div>
<span align="center">
<img alt="logo-ls with flag combination" title="logo-ls with flag combination" src="/.github/images/ls-AshDt.png">
</span>
</div><br>
### Multiple Files and Directories
You can provide multiple files and directories as command argument [default to PWD] and all will be displayed accordingly.
<div>
<span align="center">
<img alt="logo-ls with multiple files" title="logo-ls with multiple files" src="/.github/images/ls multi.png">
</span>
</div><br>
## Prerequisites
[:arrow_up: TOC](#table-of-contents)
For proper working of `logo-ls` the following should be set
- **UTF-8**: The terminal should be UTF-8 encoded (Can display Unicode-Code Point)
- **True Color** Support: The terminal can display color (16 Million Colors). for more information of True Color and supported Terminals [see here](https://gist.github.com/XVilka/8346728)
- **Nerd Fonts**: Nerd fonts are required to display Icons on screen. Basically Nerd Fonts patches your current font i.e., the last few unicode points (approx 2,824 out of 143,859) in the font are replaced with nerdy icons :nerd_face:. The complete patching process is given [here](https://github.com/ryanoasis/nerd-fonts)
## Installation
[:arrow_up: TOC](#table-of-contents)
Installation is very easy and straight forward with many options to choose from.
As of now almost all installation methods require downloading resources from the Github Release page of the project, so to be a bit more secure consider **Checking the Signature** of `logo-ls_SHA512sums.txt` text file and then use this file to check weather the resource have been tampered. This complete process is explained in more detail in [Check the downloaded Resource](#check-the-downloaded-resource) section below. (This is a recommended step and not at all required)
### Debian (.deb package)
If you are on Debian or any other Debian based distribution then installation is simple.
#### Step 1
Download the `.deb` package from [Github Release Page](https://github.com/Yash-Handa/logo-ls/releases). Available OS_Architectures include: `i386`, `amd64`, `arm64` and `armV6`. Check your downloaded resource(s) if you like.
#### Step 2
Use the `dpkg -i path/to/downloaded/resource/` to install the binary and the manpage
### Red Hat (.rpm package)
If you are on Red Hat or any other Red Hat based distribution (like fedora) then installation is simple.
#### Step 1
Download the `.rpm` package from [Github Release Page](https://github.com/Yash-Handa/logo-ls/releases). Available OS_Architectures include: `i386`, `amd64`, `arm64` and `armV6`. Check your downloaded resource(s) if you like.
#### Step 2
Use the `rpm -i path/to/downloaded/resource/` to install the binary and the manpage
### MacOS (Darwin)
To install `logo-ls` on darwin you have to download the binary. Support for Homebrew will come soon
#### Step 1
Download `logo-ls_Darwin_x86_64.tar.gz` from [Github Release Page](https://github.com/Yash-Handa/logo-ls/releases).
#### Step 2
Extract a gzipped archive in the current directory.
```cmd
$ tar -xzf logo-ls_Darwin_x86_64.tar.gz
```
This will produce `logo-ls_Darwin_x86_64` directory in the current directory with the following files: `HELP.md`, `LICENSE`, `logo-ls` and `logo-ls.1.gz`
#### Step 3
Install the binary `logo-ls` by placing it in `/usr/local/bin`
```cmd
$ cd logo-ls_Darwin_x86_64
$ sudo cp logo-ls /usr/local/bin
```
#### Step 4
If you want the man page of `logo-ls` place `logo-ls.1.gz` in `/usr/share/man/man1/`
```cmd
$ sudo cp logo-ls.1.gz /usr/share/man/man1/
```
### Linux
To install `logo-ls` on any other Linux Distribution you have to download the binary.
#### Step 1
Download the `.tar.gz` archive from [Github Release Page](https://github.com/Yash-Handa/logo-ls/releases). Available OS_Arch include: `i386`, `x86_64` (`amd64`), `arm64` and `armV6`. Check your downloaded resource(s) if you like.
#### Step 2
Extract a gzipped archive in the current directory.
```cmd
$ tar -xzf logo-ls_Linux_[ARCH].tar.gz
```
This will produce `logo-ls_Linux_[ARCH]` directory in the current directory with the following files: `HELP.md`, `LICENSE`, `logo-ls` and `logo-ls.1.gz`
#### Step 3
Install the binary `logo-ls` by placing it in `/usr/local/bin`
```cmd
$ cd logo-ls_Linux_[ARCH]
$ sudo cp logo-ls /usr/local/bin
```
#### Step 4
If you want the man page of `logo-ls` place `logo-ls.1.gz` in `/usr/share/man/man1/`
```cmd
$ sudo cp logo-ls.1.gz /usr/share/man/man1/
```
### go get
If you have [Golang](https://golang.org/) installed on your system then the `logo-ls` can be downloaded and installed using the the `go` cli tool provided by the language
#### Step 1
The `go` cli installs the binary in the directory specified by `$GOBIN` env variable [default: `~/go/bin/`]. In order to call `logo-ls` from anywhere in user-space, this directory which holds the binary must be present in `$PATH` env variable.
```cmd
$ echo $PATH
```
#### Step 2
Now simply install the binary using `go get` in home directory
```cmd
$ cd ~
$ go get github.com/Yash-Handa/logo-ls
```
### Build from Source
It is quite simple to build the command from source. You should have [Golang](https://golang.org/) installed on your system.
#### Step 1
Clone this repository.
```cmd
$ git clone https://github.com/Yash-Handa/logo-ls.git
```
#### Step 2
`cd` into the directory `logo-ls`. Then run `go mod tidy` to download the dependencies and after that `go build` to build your system specific binary
```cmd
$ cd logo-ls
$ go mod tidy
$ go build
```
the `go build` command will produce `logo-ls` executable binary in the current directory.
#### Step 3
Place the `logo-ls` executable in a directory reachable from `$PATH` env variable.
```cmd
$ sudo cp logo-ls /usr/local/bin
```
#### Step 4
If you want the man page of `logo-ls` place `logo-ls.1.gz` in `/usr/share/man/man1/`
```cmd
$ sudo cp logo-ls.1.gz /usr/share/man/man1/
```
### Check the downloaded Resource
After downloading the Resource(s) from the [Github Release Page](https://github.com/Yash-Handa/logo-ls/releases) follow the below steps to check its authenticity.
#### Step 1
Download `logo-ls_SHA512sums.txt.sig` and `logo-ls_SHA512sums.txt` from [Github Release Page](https://github.com/Yash-Handa/logo-ls/releases) and place them in the same directory as of the downloaded resource(s)
#### Step 2
Receive the public key of the signing party from `keyserver.ubuntu.com` server. This will add the developer's public key to your `keyring`.
```cmd
$ gpg2 --keyid-format long --keyserver keyserver.ubuntu.com --recv-keys 0x28182066bcacccb2
@@ -25,6 +401,8 @@ gpg: Total number processed: 1
gpg: unchanged: 1
```
#### Step 3
check the signature on logo-ls_SHA512sums.txt
```cmd
@@ -37,7 +415,9 @@ gpg: Good signature from "Yash Handa (logo-ls) <yashhanda7@yahoo.com>" [ultimate
A **Good** signature means that the checked file was definitely signed by the owner of the keyfile stated (if they didnt match, the signature would be reported as **BAD**)
Now use `logo-ls_SHA512sums.txt` file to verify the authenticity of the resource downloaded
#### Step 4
Use `logo-ls_SHA512sums.txt` file to verify the authenticity of the downloaded resource(s)
```cmd
$ sha512sum -c logo-ls_SHA512sums.txt 2>&1 | grep OK
@@ -49,56 +429,50 @@ logo-ls_Linux_i386.tar.gz: OK
logo-ls_Linux_armv6.tar.gz: OK
```
Note: The downloaded resources to verify and `logo-ls_SHA512sums.txt` should be in the same directory
## Recommended configurations
## Example Commands
[:arrow_up: TOC](#table-of-contents)
<div>
<span align="center">
<img alt="logo-ls" title="logo-ls" src="/.github/images/ls.png">
</span>
</div><br>
To add some short command (say, `ils` or `ls`) with some flag options by default, add this to your shell configuration file (`~/.bashrc`, `~/.zshrc`, etc.) :
<div>
<span align="center">
<img alt="logo-ls -aD" title="logo-ls -aD" src="/.github/images/ls-aD.png">
</span>
</div><br>
```bash
alias ils='logo-ls'
alias ila='logo-ls -A'
alias ill='logo-ls -al'
# equivalents with Git Status on by Default
alias ilsg='logo-ls -D'
alias ilag='logo-ls -AD'
alias illg='logo-ls -alD'
```
<div>
<span align="center">
<img alt="logo-ls -alhD" title="logo-ls -alhD" src="/.github/images/ls-alhD.png">
</span>
</div><br>
## Updating
<div>
<span align="center">
<img alt="logo-ls -1Dhs" title="logo-ls -1Dhs" src="/.github/images/ls-1Dhs.png">
</span>
</div><br>
[:arrow_up: TOC](#table-of-contents)
<div>
<span align="center">
<img alt="logo-ls -RD" title="logo-ls -RD" src="/.github/images/ls-RD.png">
</span>
</div><br>
<div>
<span align="center">
<img alt="logo-ls -a" title="logo-ls -a" src="/.github/images/ls-a.png">
</span>
</div><br>
<div>
<span align="center">
<img alt="logo-ls -oahd -T Kitchen" title="logo-ls -oahd -T Kitchen" src="/.github/images/ls-oahD.png">
</span>
</div><br>
As of now Updating is exactly similar as installation for [Debian (.deb package)](#debian-deb-package), [Red Hat (.rpm package)](#red-hat-rpm-package), [MacOS (Darwin)](#macos-darwin) and [Linux](#linux)
## Icon Set
[:arrow_up: TOC](#table-of-contents)
<div>
<span align="center">
<img alt="icons" title="Icon Set" src="/.github/images/icons.png">
</span>
</div><br>
## Contributing
[:arrow_up: TOC](#table-of-contents)
The project is always open to contributions. Especially for:
- More Icons
- Better ways to distribute software
- Translations to other Languages (linguistic)
## License
[:arrow_up: TOC](#table-of-contents)
The project is licensed under **MIT**. The Licence is available [here](/LICENSE).
+8
View File
@@ -1,3 +1,4 @@
// ctw is a custom tab writter package build to correctly display icons and colors for color-ls
package ctw
import (
@@ -93,6 +94,13 @@ func (w *CTW) Flush(buf *bytes.Buffer) {
totW := widthsSum(iw, pad) //total width of the ls block
if totW > w.termW {
// not even first iteration done print similar to logo-ls -1
if len(widths) == 0 {
widths = make([][4]int, len(iw))
for i := range iw {
widths[i] = iw[i]
}
}
break
} else if totW >= w.termW/2 { // if total width of the ls block is more than half of terminal
// copy iw to widths
+3
View File
@@ -58,6 +58,9 @@ func newDir(d *os.File) (*dir, error) {
var gitRepoStatus map[string]string // could be nil
if flagVector&flag_D > 0 {
gitRepoStatus = getFilesGitStatus(d.Name()) // returns map or nil
if len(gitRepoStatus) == 0 {
gitRepoStatus = nil
}
}
if curDir {
+1 -1
View File
@@ -29,7 +29,7 @@ func getRepoStatus(path string) (git.Status, string, error) {
func getFilesGitStatus(p string) map[string]string {
gitRepo, gitRoot, err := getRepoStatus(p)
if err != nil {
if err != nil || len(gitRepo) == 0 {
return nil
}
pAbs, err := filepath.Abs(p)
+6
View File
@@ -437,6 +437,12 @@ var Icon_Ext = map[string]*iInfo{
"nupkg": iSet["nuget"],
"command": iSet["command"],
"dsc": iSet["denizenscript"],
"deb": iSet["debian"],
"rpm": iSet["redhat"],
"snap": iSet["ubuntu"],
"ebuild": iSet["gentoo"],
"pkg": iSet["applescript"],
"openbsd": iSet["freebsd"],
// "ls": iSet["livescript"],
// "re": iSet["reason"],
// "rei": iSet["reason"],
+14
View File
@@ -163,6 +163,20 @@ var iSet = map[string]*iInfo{
"stryker": {"\uf05b", [3]uint8{239, 83, 80}}, // stryker
"modernizr": {"\ue720", [3]uint8{234, 72, 99}}, // modernizr
"roadmap": {"\ufb6d", [3]uint8{48, 166, 154}}, // roadmap
"debian": {"\uf306", [3]uint8{211, 61, 76}}, // debian
"ubuntu": {"\uf31c", [3]uint8{214, 73, 53}}, // ubuntu
"arch": {"\uf303", [3]uint8{33, 142, 202}}, // arch
"redhat": {"\uf316", [3]uint8{231, 61, 58}}, // redhat
"gentoo": {"\uf30d", [3]uint8{148, 141, 211}}, // gentoo
"linux": {"\ue712", [3]uint8{238, 207, 55}}, // linux
"raspberry-pi": {"\uf315", [3]uint8{208, 60, 76}}, // raspberry-pi
"manjaro": {"\uf312", [3]uint8{73, 185, 90}}, // manjaro
"opensuse": {"\uf314", [3]uint8{111, 180, 36}}, // opensuse
"fedora": {"\uf30a", [3]uint8{52, 103, 172}}, // fedora
"freebsd": {"\uf30c", [3]uint8{175, 44, 42}}, // freebsd
"centOS": {"\uf304", [3]uint8{157, 83, 135}}, // centOS
"alpine": {"\uf300", [3]uint8{14, 87, 123}}, // alpine
"mint": {"\uf30f", [3]uint8{125, 190, 58}}, // mint
"pug": {"\ue60e", [3]uint8{239, 204, 163}}, // pug (Not supported by nerdFont)
"blink": {"\uf72a", [3]uint8{249, 169, 60}}, // blink (The Foundry Nuke) (Not supported by nerdFont)
"postcss": {"\uf81b", [3]uint8{244, 68, 62}}, // postcss (Not supported by nerdFont)
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -142,7 +142,7 @@ func main() {
// if f_V is provided version will be printed and exit(0)
if *f_V {
fmt.Printf("logo-ls %s\nCopyright (c) 2020 Yash Handa\nLicense MIT <https://opensource.org/licenses/MIT>.\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n", "v1.3.0")
fmt.Printf("logo-ls %s\nCopyright (c) 2020 Yash Handa\nLicense MIT <https://opensource.org/licenses/MIT>.\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n", "v1.3.5")
fmt.Println("\nWritten by Yash Handa")
os.Exit(osExitCode)
}