♻️ Minimal fork

Signed-off-by: milky <op@gfy.lol>
This commit is contained in:
milky 2022-07-15 10:32:51 -07:00
parent e9103c7b9f
commit 77a8ade705
No known key found for this signature in database
GPG Key ID: B6CE41C2DFE6B9B7
53 changed files with 263 additions and 1436 deletions

View File

@ -1,17 +0,0 @@
#!/bin/bash
# build the binery
go build
# Update HELP.md file
echo -e "\`\`\`txt" > HELP.md
./logo-ls -? >> HELP.md
echo -e "\`\`\`" >> HELP.md
exec git add HELP.md
# Update logo-ls.1.gz
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

1
.github/go.mod vendored
View File

@ -1 +0,0 @@
// An empty go.mod file to refrain this dir to be distributed with the cli tool

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

BIN
.github/images/ls.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

View File

@ -1,36 +0,0 @@
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...

30
.gitignore vendored
View File

@ -1,29 +1 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Dependency directories (remove the comment below to include it)
# vendor/
# Do not commit the executable
logo-ls
build/
# distribution directory
dist
# env stuff
*.env
.gh_token
# test related data
testdata/dirEnv*
logo-ls

View File

@ -1,101 +0,0 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
env_files:
github_token: ~/Projects/Golang_Stuff/logo-ls/.gh_token
project_name: logo-ls
before:
hooks:
# You may remove this if you don't use go modules.
- go mod download
builds:
- env:
- CGO_ENABLED=0
# supported OS
goos:
- linux
- windows
- darwin
# supported ARCH
goarch:
- amd64
- 386
- arm64
- arm
# OS ARCH combinations to ignore
ignore:
- goos: darwin
goarch: 386
# Set the modified timestamp on the output binaries to the latest commit time.
# Required for producing Reproducible builds
mod_timestamp: '{{ .CommitTimestamp }}'
archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
# override archiving [default tar.gz]
format_overrides:
- goos: windows
format: zip
# wrap the content of archive in a dir
#so when extracting the content will be in a dir
wrap_in_directory: true
# files to be included in the archive + binary
files:
- LICENSE
- HELP.md
- logo-ls.1.gz
# - CHANGELOG.md
checksum:
name_template: '{{ .ProjectName }}_SHA512sums.txt'
algorithm: sha512
signs:
-
cmd: gpg2
# sign the checksum with Yash Handa (logo-ls) <yashhanda7@yahoo.com>
args: ["-u", "0xD9498B225223344C0205FDF528182066BCACCCB2", "--output", "${signature}", "--detach-sign", "${artifact}"]
artifacts: checksum
release:
github:
owner: Yash-Handa
name: logo-ls
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
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"

View File

@ -1,5 +0,0 @@
{
"default": true,
"MD033": false,
"MD013": false
}

View File

@ -1,5 +0,0 @@
{
"go.lintFlags": [
"\"-min_confidence=.9\""
]
}

View File

@ -1,76 +0,0 @@
# 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

View File

@ -1,5 +1,6 @@
MIT License
Copyright (c) 2022 milky
Copyright (c) 2020 Yash Handa
Permission is hereby granted, free of charge, to any person obtaining a copy

485
README.md
View File

@ -1,373 +1,130 @@
![OpenSource](https://img.shields.io/badge/Open%20Source-000000?style=for-the-badge&logo=github)
![go](https://img.shields.io/badge/-Written%20In%20Go-00add8?style=for-the-badge&logo=Go&logoColor=ffffff)
![cli](https://img.shields.io/badge/-Build%20for%20CLI-000000?style=for-the-badge&logo=Powershell&logoColor=ffffff)
# logo-ls
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/Yash-Handa/logo-ls?style=flat-square)
![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)
![AUR](https://img.shields.io/aur/version/logo-ls?style=flat-square&logo=Arch-Linux&labelColor=abcdef&label=AUR)
![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/)
![Go](https://github.com/Yash-Handa/logo-ls/workflows/Go/badge.svg)
Milked out fork of a modern ' ls ' command with beautiful icons and git integrations.
modern ls command with beautiful Icons and Git Integrations . Written in Golang
## Why?
<div>
<span align="center">
<img alt="logo-ls" title="logo-ls" src="/.github/images/ls.png">
</span>
</div><br>
This was forked because U+FB12 wasn't showing within my tmux sessions, so the class ```nf-mdi-file_hidden``` was replaced with ```nf-oct-file_code``` (U+F40D). Also, not everything matched my system-wide color scheme well enough, so I did tweak a lot of the previously used colors with more vibrant hues.
Command and Arguments supported are listed in [HELP.md](/HELP.md)
## Roadmap
## Table of contents
*Updated: ~Thur, July 15th 2022 at 09:00:00 MST*
- [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)
- [Arch Linux (AUR)](#arch-linux)
- [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)
#### Milestone Summary:
## 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.
| Status | Goal |
| :---: | :---
| ✅ | [Minimal fork](https://git.tcp.direct/milkyquest/logo-ls) |
| 🚫 | Replace preview images |
| 🚫 | [Reimplement *gorelease*](https://git.tcp.direct/milkyquest/logo-ls/issues/1) |
| 🚫 | [Support more glyphs](https://git.tcp.direct/milkyquest/logo-ls/issues/2) |
## Usage
[:arrow_up: TOC](#table-of-contents)
All supported flags can be found by using help flag: ```logo-ls --help```
All supported flags can be found by using help flag `$ logo-ls -?`. The same has been provided as [HELP.md](/HELP.md).
The same documentation has been provided within: [HELP.md](/HELP.md)
The project also has its manpage which can be accessed by `man logo-ls`
## Flags
### Flags
Almost all flags are same as that of the classic ' ls ' command and behave similarly, meaning that the project can be used as a drop-in replacement. 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.
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)
### `-1` :
List one entry per line
- With `-1`: List one entry per line
### `-a` (or) `--all`:
Doesn't ignore hidden files or dirs (entries starting with `.`)
<div>
<span align="center">
<img alt="logo-ls -1" title="logo-ls -1" src="/.github/images/ls-1.png">
</span>
</div><br>
### `-A` (or) `--almost-all`:
Doesn't ignore hidden files or dirs (but hides `./` and `../`)
- With `-a` (or) `--all` : Does not ignore entries starting with '.'
### `-D` (or) `--git-status`:
Add git status to the listed files and dirs
- *Note*: As much I would love to make this the default behavior of the command but showing git status the is an intensive task and is obviously just a tad slower.
<div>
<span align="center">
<img alt="logo-ls -a" title="logo-ls -a" src="/.github/images/ls-a.png">
</span>
</div><br>
### `-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
- With `-A` (or) `--almost-all` : Does not ignore entries starting with '.', except `./` and `../`
### `-R` (or) `--recursive`:
Lists subdirectories recursively
<div>
<span align="center">
<img alt="logo-ls -A" title="logo-ls -A" src="/.github/images/ls-A.png">
</span>
</div><br>
### `-?` (or) `--help`:
Prints the help message
- Similar message can be found at [HELP.md](/HELP.md).
- 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.
### **Sorting**:
There are many sorting flags (default is in *alphabetic order*)
- `-t`: Sort by modification time, newest first
- `-S`: Sort by file size, largest first
- `-X`: Sort alphabetically by entry extension
- `-U`: Do not sort; list entries in directory order
- `-v`: Natural sort of (version) numbers within text
- `-r` (or) `-reverse`: Reverse order while sorting
<div>
<span align="center">
<img alt="logo-ls -D" title="logo-ls -D" src="/.github/images/ls-D.png">
</span>
</div><br>
### `-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).
- 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
### `-i` (or) `--disable-icon`:
Doesn't print any icons
<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
### `-c` (or) `--disable-color`:
Doesn'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>
### Multiple Files and Directories:
For all available commands see manpage or [HELP.md](/HELP.md)
You can provide multiple files and directories as command argument (defaults to PWD) and all will be displayed accordingly.
### 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>
# Installation
## Prerequisites
[:arrow_up: TOC](#table-of-contents)
In-order to get `logo-ls` working properly, you need the following:
For proper working of `logo-ls` the following should be set
- **UTF-8**: A terminal that is UTF-8 encoded (can display Unicode-Code point).
- **True Color Support**: A terminal that can display color. For more info on colors in the terminal, [see here](https://github.com/termstandard/colors).
- **Patched Nerd Font**: A patched Nerd font is required to display these icons on-screen. Basically, you'll either download a pre-patched font or patch a font yourself by taking the current font and replacing the last few unicode points (approx 2,824 out of 143,859) with *nerdy icons* 🤓. The complete patching process is given [here](https://github.com/ryanoasis/nerd-fonts)
- **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)
## Go
## Installation
If you have [Golang](https://golang.org/) on your system, then `logo-ls` can be both downloaded and installed using the the `go` cli tool.
[:arrow_up: TOC](#table-of-contents)
### Step 1:
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
### Arch linux
Simply run `yay -S logo-ls`. (Or use the AUR helper of your choice)<br><br>
Alternatively you can clone the PKGBUILD and build the package manually:
```bash
git clone https://aur.archlinux.org/logo-ls.git
cd logo-ls
makepkg -si
```
### 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/local/share/man/man1/`
```cmd
$ sudo cp logo-ls.1.gz /usr/local/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.
The `go` cli installs the binary in the directory specified by the **`$GOBIN`** environment variable (default being: `~/go/bin/`). In order to call `logo-ls` from anywhere in user-space, this directory, which holds the binary, must be present within the **`$PATH`** environment variable.
```cmd
$ echo $PATH
```
#### Step 2
#### Step 2:
Now simply install the binary using `go get` in home directory
Now simply install the binary using `go get` in your home directory.
```cmd
$ cd ~
$ go get github.com/Yash-Handa/logo-ls
$ go get git.tcp.direct/milky/logo-ls
```
### Build from Source
## Source
It is quite simple to build the command from source. You should have [Golang](https://golang.org/) installed on your system.
It's just as simple to build this tool from source. You should have [Golang](https://golang.org/) installed on your system.
#### Step 1
#### Step 1:
Clone this repository.
```cmd
$ git clone https://github.com/Yash-Handa/logo-ls.git
$ git clone https://git.tcp.direct/milky/logo-ls.git
```
#### Step 2
#### 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
`cd` into the directory `logo-ls`. Then run `go mod tidy` to download the dependencies, after that run `go build` to build your system specific binary in the current directory. Another thing to keep in-mind is that you might need to run `chmod` to make it executable.
```cmd
$ cd logo-ls
@ -375,75 +132,15 @@ $ go mod tidy
$ go build
```
the `go build` command will produce `logo-ls` executable binary in the current directory.
#### Step 3:
#### Step 3
Place the `logo-ls` executable in a directory reachable from `$PATH` env variable.
Place the `logo-ls` executable in a reachable directory (within the`$PATH` env variable).
```cmd
$ sudo cp logo-ls /usr/local/bin
$ sudo cp logo-ls /usr/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
gpg: key 28182066BCACCCB2: "Yash Handa (logo-ls) <yashhanda7@yahoo.com>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
```
#### Step 3
check the signature on logo-ls_SHA512sums.txt
```cmd
$ gpg2 --keyid-format long --verify logo-ls_SHA512sums.txt.sig logo-ls_SHA512sums.txt
gpg: Signature made Tue 08 Sep 2020 10:21:52 PM IST
gpg: using RSA key D9498B225223344C0205FDF528182066BCACCCB2
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**)
#### 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
logo-ls_Linux_x86_64.tar.gz: OK
logo-ls_Linux_arm64.tar.gz: OK
logo-ls_Darwin_x86_64.tar.gz: OK
logo-ls_Linux_i386.tar.gz: OK
logo-ls_Linux_armv6.tar.gz: OK
```
## Recommended configurations
[:arrow_up: TOC](#table-of-contents)
## Recommendations
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.) :
@ -451,40 +148,8 @@ To add some short command (say, `ils` or `ls`) with some flag options by default
alias ils='logo-ls'
alias ila='logo-ls -A'
alias ill='logo-ls -al'
# equivalents with Git Status on by Default
# Display Git Status ⤵
alias ilsg='logo-ls -D'
alias ilag='logo-ls -AD'
alias illg='logo-ls -alD'
```
## Updating
[:arrow_up: TOC](#table-of-contents)
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).

View File

@ -401,6 +401,7 @@ var Icon_Ext = map[string]*Icon_Info{
"obj": Icon_Set["3d"],
"ac": Icon_Set["3d"],
"blend": Icon_Set["3d"],
"c4d": Icon_Set["3d"],
"mesh": Icon_Set["3d"],
"mqo": Icon_Set["3d"],
"pmd": Icon_Set["3d"],
@ -443,94 +444,4 @@ var Icon_Ext = map[string]*Icon_Info{
"ebuild": Icon_Set["gentoo"],
"pkg": Icon_Set["applescript"],
"openbsd": Icon_Set["freebsd"],
// "ls": Icon_Set["livescript"],
// "re": Icon_Set["reason"],
// "rei": Icon_Set["reason"],
// "cmj": Icon_Set["bucklescript"],
// "nb": Icon_Set["mathematica"],
// "wl": Icon_Set["wolframlanguage"],
// "wls": Icon_Set["wolframlanguage"],
// "njk": Icon_Set["nunjucks"],
// "nunjucks": Icon_Set["nunjucks"],
// "au3": Icon_Set["autoit"],
// "haml": Icon_Set["haml"],
// "feature": Icon_Set["cucumber"],
// "riot": Icon_Set["riot"],
// "tag": Icon_Set["riot"],
// "vfl": Icon_Set["vfl"],
// "kl": Icon_Set["kl"],
// "cfml": Icon_Set["coldfusion"],
// "cfc": Icon_Set["coldfusion"],
// "lucee": Icon_Set["coldfusion"],
// "cfm": Icon_Set["coldfusion"],
// "cabal": Icon_Set["cabal"],
// "rql": Icon_Set["restql"],
// "restql": Icon_Set["restql"],
// "kv": Icon_Set["kivy"],
// "graphcool": Icon_Set["graphcool"],
// "sbt": Icon_Set["sbt"],
// "cr": Icon_Set["crystal"],
// "ecr": Icon_Set["crystal"],
// "cu": Icon_Set["cuda"],
// "cuh": Icon_Set["cuda"],
// "def": Icon_Set["dotjs"],
// "dot": Icon_Set["dotjs"],
// "jst": Icon_Set["dotjs"],
// "pde": Icon_Set["processing"],
// "wpy": Icon_Set["wepy"],
// "hcl": Icon_Set["hcl"],
// "san": Icon_Set["san"],
// "red": Icon_Set["red"],
// "fxp": Icon_Set["foxpro"],
// "prg": Icon_Set["foxpro"],
// "wat": Icon_Set["webassembly"],
// "wasm": Icon_Set["webassembly"],
// "ipynb": Icon_Set["jupyter"],
// "bal": Icon_Set["ballerina"],
// "balx": Icon_Set["ballerina"],
// "rkt": Icon_Set["racket"],
// "bzl": Icon_Set["bazel"],
// "bazel": Icon_Set["bazel"],
// "mint": Icon_Set["mint"],
// "vm": Icon_Set["velocity"],
// "fhtml": Icon_Set["velocity"],
// "vtl": Icon_Set["velocity"],
// "prisma": Icon_Set["prisma"],
// "abc": Icon_Set["abc"],
// "lisp": Icon_Set["lisp"],
// "lsp": Icon_Set["lisp"],
// "cl": Icon_Set["lisp"],
// "fast": Icon_Set["lisp"],
// "svelte": Icon_Set["svelte"],
// "prw": Icon_Set["advpl_prw"],
// "prx": Icon_Set["advpl_prw"],
// "ptm": Icon_Set["advpl_ptm"],
// "tlpp": Icon_Set["advpl_tlpp"],
// "ch": Icon_Set["advpl_include"],
// "4th": Icon_Set["forth"],
// "fth": Icon_Set["forth"],
// "frt": Icon_Set["forth"],
// "iuml": Icon_Set["uml"],
// "pu": Icon_Set["uml"],
// "puml": Icon_Set["uml"],
// "plantuml": Icon_Set["uml"],
// "wsd": Icon_Set["uml"],
// "sml": Icon_Set["sml"],
// "mlton": Icon_Set["sml"],
// "mlb": Icon_Set["sml"],
// "sig": Icon_Set["sml"],
// "fun": Icon_Set["sml"],
// "cm": Icon_Set["sml"],
// "lex": Icon_Set["sml"],
// "use": Icon_Set["sml"],
// "grm": Icon_Set["sml"],
// "imba": Icon_Set["imba"],
// "drawio": Icon_Set["drawio"],
// "dio": Icon_Set["drawio"],
// "sas": Icon_Set["sas"],
// "sas7bdat": Icon_Set["sas"],
// "sashdat": Icon_Set["sas"],
// "astore": Icon_Set["sas"],
// "ast": Icon_Set["sas"],
// "sast": Icon_Set["sas"],
}

View File

@ -29,10 +29,10 @@ func (i *Icon_Info) MakeExe() {
var Icon_Set = map[string]*Icon_Info{
"html": {i: "\uf13b", c: [3]uint8{228, 79, 57}}, // html
"markdown": {i: "\uf853", c: [3]uint8{66, 165, 245}}, // markdown
"css": {i: "\uf81b", c: [3]uint8{66, 165, 245}}, // css
"css-map": {i: "\ue749", c: [3]uint8{66, 165, 245}}, // css-map
"sass": {i: "\ue603", c: [3]uint8{237, 80, 122}}, // sass
"markdown": {i: "\uf853", c: [3]uint8{29, 161, 242}}, // markdown
"css": {i: "\uf81b", c: [3]uint8{29, 161, 242}}, // css
"css-map": {i: "\ue749", c: [3]uint8{29, 161, 242}}, // css-map
"sass": {i: "\ue603", c: [3]uint8{255, 116, 153}}, // sass
"less": {i: "\ue60b", c: [3]uint8{2, 119, 189}}, // less
"json": {i: "\ue60b", c: [3]uint8{251, 193, 60}}, // json
"yaml": {i: "\ue60b", c: [3]uint8{244, 68, 62}}, // yaml
@ -44,7 +44,7 @@ var Icon_Set = map[string]*Icon_Info{
"test-js": {i: "\uf595", c: [3]uint8{255, 202, 61}}, // test-js
"react": {i: "\ue7ba", c: [3]uint8{35, 188, 212}}, // react
"react_ts": {i: "\ue7ba", c: [3]uint8{36, 142, 211}}, // react_ts
"settings": {i: "\uf013", c: [3]uint8{66, 165, 245}}, // settings
"settings": {i: "\uf013", c: [3]uint8{29, 161, 242}}, // settings
"typescript": {i: "\ue628", c: [3]uint8{3, 136, 209}}, // typescript
"typescript-def": {i: "\ufbe4", c: [3]uint8{3, 136, 209}}, // typescript-def
"test-ts": {i: "\uf595", c: [3]uint8{3, 136, 209}}, // test-ts
@ -52,24 +52,24 @@ var Icon_Set = map[string]*Icon_Info{
"table": {i: "\uf71a", c: [3]uint8{139, 195, 74}}, // table
"visualstudio": {i: "\ue70c", c: [3]uint8{173, 99, 188}}, // visualstudio
"database": {i: "\ue706", c: [3]uint8{255, 202, 61}}, // database
"mysql": {i: "\ue704", c: [3]uint8{1, 94, 134}}, // mysql
"mysql": {i: "\ue704", c: [3]uint8{29, 161, 242}}, // mysql
"postgresql": {i: "\ue76e", c: [3]uint8{49, 99, 140}}, // postgresql
"sqlite": {i: "\ue7c4", c: [3]uint8{1, 57, 84}}, // sqlite
"csharp": {i: "\uf81a", c: [3]uint8{2, 119, 189}}, // csharp
"zip": {i: "\uf410", c: [3]uint8{175, 180, 43}}, // zip
"exe": {i: "\uf2d0", c: [3]uint8{229, 77, 58}}, // exe
"zip": {i: "\uf410", c: [3]uint8{63, 197, 107}}, // zip
"exe": {i: "\uf2d0", c: [3]uint8{244, 68, 62}}, // exe
"java": {i: "\uf675", c: [3]uint8{244, 68, 62}}, // java
"c": {i: "\ufb70", c: [3]uint8{2, 119, 189}}, // c
"cpp": {i: "\ufb71", c: [3]uint8{2, 119, 189}}, // cpp
"go": {i: "\ufcd1", c: [3]uint8{32, 173, 194}}, // go
"go": {i: "\ufcd1", c: [3]uint8{0, 218, 218}}, // go
"go-mod": {i: "\ufcd1", c: [3]uint8{237, 80, 122}}, // go-mod
"go-test": {i: "\ufcd1", c: [3]uint8{255, 213, 79}}, // go-test
"go-test": {i: "\ufcd1", c: [3]uint8{249, 200, 89}}, // go-test
"python": {i: "\uf81f", c: [3]uint8{52, 102, 143}}, // python
"python-misc": {i: "\uf820", c: [3]uint8{130, 61, 28}}, // python-misc
"url": {i: "\uf836", c: [3]uint8{66, 165, 245}}, // url
"url": {i: "\uf836", c: [3]uint8{29, 161, 242}}, // url
"console": {i: "\uf68c", c: [3]uint8{250, 111, 66}}, // console
"word": {i: "\uf72b", c: [3]uint8{1, 87, 155}}, // word
"certificate": {i: "\uf623", c: [3]uint8{249, 89, 63}}, // certificate
"certificate": {i: "\uf623", c: [3]uint8{244, 68, 62}}, // certificate 244, 68, 62
"key": {i: "\uf805", c: [3]uint8{48, 166, 154}}, // key
"font": {i: "\uf031", c: [3]uint8{244, 68, 62}}, // font
"lib": {i: "\uf831", c: [3]uint8{139, 195, 74}}, // lib
@ -81,16 +81,16 @@ var Icon_Set = map[string]*Icon_Info{
"powerpoint": {i: "\uf726", c: [3]uint8{209, 71, 51}}, // powerpoint
"video": {i: "\uf72a", c: [3]uint8{253, 154, 62}}, // video
"virtual": {i: "\uf822", c: [3]uint8{3, 155, 229}}, // virtual
"email": {i: "\uf6ed", c: [3]uint8{66, 165, 245}}, // email
"email": {i: "\uf6ed", c: [3]uint8{29, 161, 242}}, // email
"audio": {i: "\ufb75", c: [3]uint8{239, 83, 80}}, // audio
"coffee": {i: "\uf675", c: [3]uint8{66, 165, 245}}, // coffee
"document": {i: "\uf718", c: [3]uint8{66, 165, 245}}, // document
"coffee": {i: "\uf675", c: [3]uint8{29, 161, 242}}, // coffee
"document": {i: "\uf718", c: [3]uint8{29, 161, 242}}, // document
"rust": {i: "\ue7a8", c: [3]uint8{250, 111, 66}}, // rust
"raml": {i: "\ue60b", c: [3]uint8{66, 165, 245}}, // raml
"xaml": {i: "\ufb72", c: [3]uint8{66, 165, 245}}, // xaml
"raml": {i: "\ue60b", c: [3]uint8{29, 161, 242}}, // raml
"xaml": {i: "\ufb72", c: [3]uint8{29, 161, 242}}, // xaml
"haskell": {i: "\ue61f", c: [3]uint8{254, 168, 62}}, // haskell
"git": {i: "\ue702", c: [3]uint8{229, 77, 58}}, // git
"lua": {i: "\ue620", c: [3]uint8{66, 165, 245}}, // lua
"git": {i: "\ue702", c: [3]uint8{244, 68, 62}}, // git
"lua": {i: "\ue620", c: [3]uint8{29, 161, 242}}, // lua
"clojure": {i: "\ue76a", c: [3]uint8{100, 221, 23}}, // clojure
"groovy": {i: "\uf2a6", c: [3]uint8{41, 198, 218}}, // groovy
"r": {i: "\ufcd2", c: [3]uint8{25, 118, 210}}, // r
@ -99,7 +99,7 @@ var Icon_Set = map[string]*Icon_Info{
"assembly": {i: "\uf471", c: [3]uint8{250, 109, 63}}, // assembly
"vue": {i: "\ufd42", c: [3]uint8{65, 184, 131}}, // vue
"vue-config": {i: "\ufd42", c: [3]uint8{58, 121, 110}}, // vue-config
"lock": {i: "\uf83d", c: [3]uint8{255, 213, 79}}, // lock
"lock": {i: "\uf83d", c: [3]uint8{249, 200, 89}}, // lock
"handlebars": {i: "\ue60f", c: [3]uint8{250, 111, 66}}, // handlebars
"perl": {i: "\ue769", c: [3]uint8{149, 117, 205}}, // perl
"elixir": {i: "\ue62d", c: [3]uint8{149, 117, 205}}, // elixir
@ -110,16 +110,16 @@ var Icon_Set = map[string]*Icon_Info{
"smarty": {i: "\uf834", c: [3]uint8{255, 207, 60}}, // smarty
"stylus": {i: "\ue600", c: [3]uint8{192, 202, 51}}, // stylus
"verilog": {i: "\ufb19", c: [3]uint8{250, 111, 66}}, // verilog
"robot": {i: "\ufba7", c: [3]uint8{249, 89, 63}}, // robot
"robot": {i: "\ufba7", c: [3]uint8{244, 68, 62}}, // robot
"solidity": {i: "\ufcb9", c: [3]uint8{3, 136, 209}}, // solidity
"yang": {i: "\ufb7e", c: [3]uint8{66, 165, 245}}, // yang
"yang": {i: "\ufb7e", c: [3]uint8{29, 161, 242}}, // yang
"vercel": {i: "\uf47e", c: [3]uint8{207, 216, 220}}, // vercel
"applescript": {i: "\uf302", c: [3]uint8{120, 144, 156}}, // applescript
"cake": {i: "\uf5ea", c: [3]uint8{250, 111, 66}}, // cake
"nim": {i: "\uf6a4", c: [3]uint8{255, 202, 61}}, // nim
"todo": {i: "\uf058", c: [3]uint8{124, 179, 66}}, // todo
"nix": {i: "\uf313", c: [3]uint8{80, 117, 193}}, // nix
"http": {i: "\uf484", c: [3]uint8{66, 165, 245}}, // http
"http": {i: "\uf484", c: [3]uint8{29, 161, 242}}, // http
"webpack": {i: "\ufc29", c: [3]uint8{142, 214, 251}}, // webpack
"ionic": {i: "\ue7a9", c: [3]uint8{79, 143, 247}}, // ionic
"gulp": {i: "\ue763", c: [3]uint8{229, 61, 58}}, // gulp
@ -129,20 +129,20 @@ var Icon_Set = map[string]*Icon_Info{
"android": {i: "\uf531", c: [3]uint8{139, 195, 74}}, // android
"tune": {i: "\ufb69", c: [3]uint8{251, 193, 60}}, // tune
"contributing": {i: "\uf64d", c: [3]uint8{255, 202, 61}}, // contributing
"readme": {i: "\uf7fb", c: [3]uint8{66, 165, 245}}, // readme
"readme": {i: "\uf7fb", c: [3]uint8{29, 161, 242}}, // readme
"changelog": {i: "\ufba6", c: [3]uint8{139, 195, 74}}, // changelog
"credits": {i: "\uf75f", c: [3]uint8{156, 204, 101}}, // credits
"authors": {i: "\uf0c0", c: [3]uint8{244, 68, 62}}, // authors
"favicon": {i: "\ue623", c: [3]uint8{255, 213, 79}}, // favicon
"favicon": {i: "\ue623", c: [3]uint8{249, 200, 89}}, // favicon
"karma": {i: "\ue622", c: [3]uint8{60, 190, 174}}, // karma
"travis": {i: "\ue77e", c: [3]uint8{203, 58, 73}}, // travis
"heroku": {i: "\ue607", c: [3]uint8{105, 99, 185}}, // heroku
"gitlab": {i: "\uf296", c: [3]uint8{226, 69, 57}}, // gitlab
"bower": {i: "\ue61a", c: [3]uint8{239, 88, 60}}, // bower
"conduct": {i: "\uf64b", c: [3]uint8{205, 220, 57}}, // conduct
"conduct": {i: "\uf64b", c: [3]uint8{244, 68, 62}}, // conduct
"jenkins": {i: "\ue767", c: [3]uint8{240, 214, 183}}, // jenkins
"code-climate": {i: "\uf7f4", c: [3]uint8{238, 238, 238}}, // code-climate
"log": {i: "\uf719", c: [3]uint8{175, 180, 43}}, // log
"log": {i: "\uf719", c: [3]uint8{63, 197, 107}}, // log
"ejs": {i: "\ue618", c: [3]uint8{255, 202, 61}}, // ejs
"grunt": {i: "\ue611", c: [3]uint8{251, 170, 61}}, // grunt
"django": {i: "\ue71d", c: [3]uint8{67, 160, 71}}, // django
@ -152,7 +152,7 @@ var Icon_Set = map[string]*Icon_Info{
"mdx": {i: "\uf853", c: [3]uint8{255, 202, 61}}, // mdx
"azure-pipelines": {i: "\uf427", c: [3]uint8{20, 101, 192}}, // azure-pipelines
"azure": {i: "\ufd03", c: [3]uint8{31, 136, 229}}, // azure
"razor": {i: "\uf564", c: [3]uint8{66, 165, 245}}, // razor
"razor": {i: "\uf564", c: [3]uint8{29, 161, 242}}, // razor
"asciidoc": {i: "\uf718", c: [3]uint8{244, 68, 62}}, // asciidoc
"edge": {i: "\uf564", c: [3]uint8{239, 111, 60}}, // edge
"scheme": {i: "\ufb26", c: [3]uint8{244, 68, 62}}, // scheme
@ -160,7 +160,7 @@ var Icon_Set = map[string]*Icon_Info{
"svg": {i: "\ufc1f", c: [3]uint8{255, 181, 62}}, // svg
"vim": {i: "\ue62b", c: [3]uint8{67, 160, 71}}, // vim
"moonscript": {i: "\uf186", c: [3]uint8{251, 193, 60}}, // moonscript
"codeowners": {i: "\uf507", c: [3]uint8{175, 180, 43}}, // codeowners
"codeowners": {i: "\uf507", c: [3]uint8{164, 225, 109}}, // codeowners
"disc": {i: "\ue271", c: [3]uint8{176, 190, 197}}, // disc
"fortran": {i: "F", c: [3]uint8{250, 111, 66}}, // fortran
"tcl": {i: "\ufbd1", c: [3]uint8{239, 83, 80}}, // tcl
@ -177,15 +177,15 @@ var Icon_Set = map[string]*Icon_Info{
"command": {i: "\ufb32", c: [3]uint8{175, 188, 194}}, // command
"stryker": {i: "\uf05b", c: [3]uint8{239, 83, 80}}, // stryker
"modernizr": {i: "\ue720", c: [3]uint8{234, 72, 99}}, // modernizr
"roadmap": {i: "\ufb6d", c: [3]uint8{48, 166, 154}}, // roadmap
"debian": {i: "\uf306", c: [3]uint8{211, 61, 76}}, // debian
"ubuntu": {i: "\uf31c", c: [3]uint8{214, 73, 53}}, // ubuntu
"arch": {i: "\uf303", c: [3]uint8{33, 142, 202}}, // arch
"redhat": {i: "\uf316", c: [3]uint8{231, 61, 58}}, // redhat
"gentoo": {i: "\uf30d", c: [3]uint8{148, 141, 211}}, // gentoo
"linux": {i: "\ue712", c: [3]uint8{238, 207, 55}}, // linux
"raspberry-pi": {i: "\uf315", c: [3]uint8{208, 60, 76}}, // raspberry-pi
"manjaro": {i: "\uf312", c: [3]uint8{73, 185, 90}}, // manjaro
"roadmap": {i: "\ufb6d", c: [3]uint8{63, 197, 107}}, // roadmap
"debian": {i: "\uf306", c: [3]uint8{244, 68, 62}}, // debian
"ubuntu": {i: "\uf31c", c: [3]uint8{244, 68, 62}}, // ubuntu
"arch": {i: "\uf303", c: [3]uint8{29, 161, 242}}, // arch
"redhat": {i: "\uf316", c: [3]uint8{244, 68, 62}}, // redhat
"gentoo": {i: "\uf30d", c: [3]uint8{63, 197, 107}}, // gentoo
"linux": {i: "\ue712", c: [3]uint8{244, 68, 62}}, // linux
"raspberry-pi": {i: "\uf315", c: [3]uint8{244, 68, 62}}, // raspberry-pi
"manjaro": {i: "\uf312", c: [3]uint8{63, 197, 107}}, // manjaro
"opensuse": {i: "\uf314", c: [3]uint8{111, 180, 36}}, // opensuse
"fedora": {i: "\uf30a", c: [3]uint8{52, 103, 172}}, // fedora
"freebsd": {i: "\uf30c", c: [3]uint8{175, 44, 42}}, // freebsd
@ -209,11 +209,11 @@ var Icon_Set = map[string]*Icon_Info{
"powershell": {i: "\ufcb5", c: [3]uint8{5, 169, 244}}, // powershell (Not supported by nerdFont)
"gradle": {i: "\ufcc4", c: [3]uint8{29, 151, 167}}, // gradle (Not supported by nerdFont)
"arduino": {i: "\ue255", c: [3]uint8{35, 151, 156}}, // arduino (Not supported by nerdFont)
"tex": {i: "\uf783", c: [3]uint8{66, 165, 245}}, // tex (Not supported by nerdFont)
"tex": {i: "\uf783", c: [3]uint8{29, 161, 242}}, // tex (Not supported by nerdFont)
"graphql": {i: "\ue284", c: [3]uint8{237, 80, 122}}, // graphql (Not supported by nerdFont)
"kotlin": {i: "\ue70e", c: [3]uint8{139, 195, 74}}, // kotlin (Not supported by nerdFont)
"actionscript": {i: "\ufb25", c: [3]uint8{244, 68, 62}}, // actionscript (Not supported by nerdFont)
"autohotkey": {i: "\uf812", c: [3]uint8{76, 175, 80}}, // autohotkey (Not supported by nerdFont)
"autohotkey": {i: "\uf812", c: [3]uint8{63, 197, 107}}, // autohotkey (Not supported by nerdFont)
"flash": {i: "\uf740", c: [3]uint8{198, 52, 54}}, // flash (Not supported by nerdFont)
"swc": {i: "\ufbd3", c: [3]uint8{198, 52, 54}}, // swc (Not supported by nerdFont)
"cmake": {i: "\uf425", c: [3]uint8{178, 178, 179}}, // cmake (Not supported by nerdFont)
@ -221,11 +221,11 @@ var Icon_Set = map[string]*Icon_Info{
"ocaml": {i: "\uf1ce", c: [3]uint8{253, 154, 62}}, // ocaml (Not supported by nerdFont)
"haxe": {i: "\uf425", c: [3]uint8{246, 137, 61}}, // haxe (Not supported by nerdFont)
"puppet": {i: "\uf595", c: [3]uint8{251, 193, 60}}, // puppet (Not supported by nerdFont)
"purescript": {i: "\uf670", c: [3]uint8{66, 165, 245}}, // purescript (Not supported by nerdFont)
"merlin": {i: "\uf136", c: [3]uint8{66, 165, 245}}, // merlin (Not supported by nerdFont)
"mjml": {i: "\ue714", c: [3]uint8{249, 89, 63}}, // mjml (Not supported by nerdFont)
"purescript": {i: "\uf670", c: [3]uint8{29, 161, 242}}, // purescript (Not supported by nerdFont)
"merlin": {i: "\uf136", c: [3]uint8{29, 161, 242}}, // merlin (Not supported by nerdFont)
"mjml": {i: "\ue714", c: [3]uint8{244, 68, 62}}, // mjml (Not supported by nerdFont)
"terraform": {i: "\ue20f", c: [3]uint8{92, 107, 192}}, // terraform (Not supported by nerdFont)
"apiblueprint": {i: "\uf031", c: [3]uint8{66, 165, 245}}, // apiblueprint (Not supported by nerdFont)
"apiblueprint": {i: "\uf031", c: [3]uint8{29, 161, 242}}, // apiblueprint (Not supported by nerdFont)
"slim": {i: "\uf24e", c: [3]uint8{245, 129, 61}}, // slim (Not supported by nerdFont)
"babel": {i: "\uf5a0", c: [3]uint8{253, 217, 59}}, // babel (Not supported by nerdFont)
"codecov": {i: "\ue37c", c: [3]uint8{237, 80, 122}}, // codecov (Not supported by nerdFont)
@ -236,9 +236,9 @@ var Icon_Set = map[string]*Icon_Info{
"stylelint": {i: "\ufb76", c: [3]uint8{207, 216, 220}}, // stylelint (Not supported by nerdFont)
"prettier": {i: "\uf8e2", c: [3]uint8{86, 179, 180}}, // prettier (Not supported by nerdFont)
"jest": {i: "J", c: [3]uint8{244, 85, 62}}, // jest (Not supported by nerdFont)
"storybook": {i: "\ufd2c", c: [3]uint8{237, 80, 122}}, // storybook (Not supported by nerdFont)
"storybook": {i: "\ufd2c", c: [3]uint8{255, 116, 153}}, // storybook (Not supported by nerdFont)
"fastlane": {i: "\ufbff", c: [3]uint8{149, 119, 232}}, // fastlane (Not supported by nerdFont)
"helm": {i: "\ufd31", c: [3]uint8{32, 173, 194}}, // helm (Not supported by nerdFont)
"helm": {i: "\ufd31", c: [3]uint8{0, 218, 218}}, // helm (Not supported by nerdFont)
"i18n": {i: "\uf7be", c: [3]uint8{121, 134, 203}}, // i18n (Not supported by nerdFont)
"semantic-release": {i: "\uf70f", c: [3]uint8{245, 245, 245}}, // semantic-release (Not supported by nerdFont)
"godot": {i: "\ufba7", c: [3]uint8{79, 195, 247}}, // godot (Not supported by nerdFont)
@ -246,103 +246,20 @@ var Icon_Set = map[string]*Icon_Info{
"vagrant": {i: "\uf27d", c: [3]uint8{20, 101, 192}}, // vagrant (Not supported by nerdFont)
"tailwindcss": {i: "\ufc8b", c: [3]uint8{77, 182, 172}}, // tailwindcss (Not supported by nerdFont)
"gcp": {i: "\uf662", c: [3]uint8{70, 136, 250}}, // gcp (Not supported by nerdFont)
"opam": {i: "\uf1ce", c: [3]uint8{255, 213, 79}}, // opam (Not supported by nerdFont)
"opam": {i: "\uf1ce", c: [3]uint8{249, 200, 89}}, // opam (Not supported by nerdFont)
"pascal": {i: "\uf8da", c: [3]uint8{3, 136, 209}}, // pascal (Not supported by nerdFont)
"nuget": {i: "\ue77f", c: [3]uint8{3, 136, 209}}, // nuget (Not supported by nerdFont)
"denizenscript": {i: "D", c: [3]uint8{255, 213, 79}}, // denizenscript (Not supported by nerdFont)
// "riot": {i:"\u", c:[3]uint8{255, 255, 255}}, // riot
// "autoit": {i:"\u", c:[3]uint8{255, 255, 255}}, // autoit
// "livescript": {i:"\u", c:[3]uint8{255, 255, 255}}, // livescript
// "reason": {i:"\u", c:[3]uint8{255, 255, 255}}, // reason
// "bucklescript": {i:"\u", c:[3]uint8{255, 255, 255}}, // bucklescript
// "mathematica": {i:"\u", c:[3]uint8{255, 255, 255}}, // mathematica
// "wolframlanguage": {i:"\u", c:[3]uint8{255, 255, 255}}, // wolframlanguage
// "nunjucks": {i:"\u", c:[3]uint8{255, 255, 255}}, // nunjucks
// "haml": {i:"\u", c:[3]uint8{255, 255, 255}}, // haml
// "cucumber": {i:"\u", c:[3]uint8{255, 255, 255}}, // cucumber
// "vfl": {i:"\u", c:[3]uint8{255, 255, 255}}, // vfl
// "kl": {i:"\u", c:[3]uint8{255, 255, 255}}, // kl
// "coldfusion": {i:"\u", c:[3]uint8{255, 255, 255}}, // coldfusion
// "cabal": {i:"\u", c:[3]uint8{255, 255, 255}}, // cabal
// "restql": {i:"\u", c:[3]uint8{255, 255, 255}}, // restql
// "kivy": {i:"\u", c:[3]uint8{255, 255, 255}}, // kivy
// "graphcool": {i:"\u", c:[3]uint8{255, 255, 255}}, // graphcool
// "sbt": {i:"\u", c:[3]uint8{255, 255, 255}}, // sbt
// "flow": {i:"\u", c:[3]uint8{255, 255, 255}}, // flow
// "bithound": {i:"\u", c:[3]uint8{255, 255, 255}}, // bithound
// "appveyor": {i:"\u", c:[3]uint8{255, 255, 255}}, // appveyor
// "fusebox": {i:"\u", c:[3]uint8{255, 255, 255}}, // fusebox
// "editorconfig": {i:"\u", c:[3]uint8{255, 255, 255}}, // editorconfig
// "watchman": {i:"\u", c:[3]uint8{255, 255, 255}}, // watchman
// "aurelia": {i:"\u", c:[3]uint8{255, 255, 255}}, // aurelia
// "rollup": {i:"\u", c:[3]uint8{255, 255, 255}}, // rollup
// "hack": {i:"\u", c:[3]uint8{255, 255, 255}}, // hack
// "apollo": {i:"\u", c:[3]uint8{255, 255, 255}}, // apollo
// "nodemon": {i:"\u", c:[3]uint8{255, 255, 255}}, // nodemon
// "webhint": {i:"\u", c:[3]uint8{255, 255, 255}}, // webhint
// "browserlist": {i:"\u", c:[3]uint8{255, 255, 255}}, // browserlist
// "crystal": {i:"\u", c:[3]uint8{255, 255, 255}}, // crystal
// "snyk": {i:"\u", c:[3]uint8{255, 255, 255}}, // snyk
// "drone": {i:"\u", c:[3]uint8{255, 255, 255}}, // drone
// "cuda": {i:"\u", c:[3]uint8{255, 255, 255}}, // cuda
// "dotjs": {i:"\u", c:[3]uint8{255, 255, 255}}, // dotjs
// "sequelize": {i:"\u", c:[3]uint8{255, 255, 255}}, // sequelize
// "gatsby": {i:"\u", c:[3]uint8{255, 255, 255}}, // gatsby
// "wakatime": {i:"\u", c:[3]uint8{255, 255, 255}}, // wakatime
// "circleci": {i:"\u", c:[3]uint8{255, 255, 255}}, // circleci
// "cloudfoundry": {i:"\u", c:[3]uint8{255, 255, 255}}, // cloudfoundry
// "processing": {i:"\u", c:[3]uint8{255, 255, 255}}, // processing
// "wepy": {i:"\u", c:[3]uint8{255, 255, 255}}, // wepy
// "hcl": {i:"\u", c:[3]uint8{255, 255, 255}}, // hcl
// "san": {i:"\u", c:[3]uint8{255, 255, 255}}, // san
// "wallaby": {i:"\u", c:[3]uint8{255, 255, 255}}, // wallaby
// "stencil": {i:"\u", c:[3]uint8{255, 255, 255}}, // stencil
// "red": {i:"\u", c:[3]uint8{255, 255, 255}}, // red
// "webassembly": {i:"\u", c:[3]uint8{255, 255, 255}}, // webassembly
// "foxpro": {i:"\u", c:[3]uint8{255, 255, 255}}, // foxpro
// "jupyter": {i:"\u", c:[3]uint8{255, 255, 255}}, // jupyter
// "ballerina": {i:"\u", c:[3]uint8{255, 255, 255}}, // ballerina
// "racket": {i:"\u", c:[3]uint8{255, 255, 255}}, // racket
// "bazel": {i:"\u", c:[3]uint8{255, 255, 255}}, // bazel
// "mint": {i:"\u", c:[3]uint8{255, 255, 255}}, // mint
// "velocity": {i:"\u", c:[3]uint8{255, 255, 255}}, // velocity
// "prisma": {i:"\u", c:[3]uint8{255, 255, 255}}, // prisma
// "abc": {i:"\u", c:[3]uint8{255, 255, 255}}, // abc
// "istanbul": {i:"\u", c:[3]uint8{255, 255, 255}}, // istanbul
// "lisp": {i:"\u", c:[3]uint8{255, 255, 255}}, // lisp
// "buildkite": {i:"\u", c:[3]uint8{255, 255, 255}}, // buildkite
// "netlify": {i:"\u", c:[3]uint8{255, 255, 255}}, // netlify
// "svelte": {i:"\u", c:[3]uint8{255, 255, 255}}, // svelte
// "nest": {i:"\u", c:[3]uint8{255, 255, 255}}, // nest
// "percy": {i:"\u", c:[3]uint8{255, 255, 255}}, // percy
// "gitpod": {i:"\u", c:[3]uint8{255, 255, 255}}, // gitpod
// "advpl_prw": {i:"\u", c:[3]uint8{255, 255, 255}}, // advpl_prw
// "advpl_ptm": {i:"\u", c:[3]uint8{255, 255, 255}}, // advpl_ptm
// "advpl_tlpp": {i:"\u", c:[3]uint8{255, 255, 255}}, // advpl_tlpp
// "advpl_include": {i:"\u", c:[3]uint8{255, 255, 255}}, // advpl_include
// "tilt": {i:"\u", c:[3]uint8{255, 255, 255}}, // tilt
// "capacitor": {i:"\u", c:[3]uint8{255, 255, 255}}, // capacitor
// "adonis": {i:"\u", c:[3]uint8{255, 255, 255}}, // adonis
// "forth": {i:"\u", c:[3]uint8{255, 255, 255}}, // forth
// "uml": {i:"\u", c:[3]uint8{255, 255, 255}}, // uml
// "meson": {i:"\u", c:[3]uint8{255, 255, 255}}, // meson
// "buck": {i:"\u", c:[3]uint8{255, 255, 255}}, // buck
// "sml": {i:"\u", c:[3]uint8{255, 255, 255}}, // sml
// "nrwl": {i:"\u", c:[3]uint8{255, 255, 255}}, // nrwl
// "imba": {i:"\u", c:[3]uint8{255, 255, 255}}, // imba
// "drawio": {i:"\u", c:[3]uint8{255, 255, 255}}, // drawio
// "sas": {i:"\u", c:[3]uint8{255, 255, 255}}, // sas
// "slug": {i:"\u", c:[3]uint8{255, 255, 255}}, // slug
"denizenscript": {i: "D", c: [3]uint8{249, 200, 89}}, // denizenscript (Not supported by nerdFont)
"dir-config": {i: "\ue5fc", c: [3]uint8{32, 173, 194}}, // dir-config
"dir-config": {i: "\ue5fc", c: [3]uint8{0, 218, 218}}, // dir-config
"dir-controller": {i: "\ue5fc", c: [3]uint8{255, 194, 61}}, // dir-controller
"dir-git": {i: "\ue5fb", c: [3]uint8{250, 111, 66}}, // dir-git
"dir-github": {i: "\ue5fd", c: [3]uint8{84, 110, 122}}, // dir-github
"dir-git": {i: "\ue5fb", c: [3]uint8{244, 68, 62}}, // dir-git
"dir-github": {i: "\ue5fd", c: [3]uint8{135, 162, 174}}, // dir-github
"dir-npm": {i: "\ue5fa", c: [3]uint8{203, 56, 55}}, // dir-npm
"dir-include": {i: "\uf756", c: [3]uint8{3, 155, 229}}, // dir-include
"dir-import": {i: "\uf756", c: [3]uint8{175, 180, 43}}, // dir-import
"dir-import": {i: "\uf756", c: [3]uint8{164, 225, 109}}, // dir-import
"dir-upload": {i: "\uf758", c: [3]uint8{250, 111, 66}}, // dir-upload
"dir-download": {i: "\uf74c", c: [3]uint8{76, 175, 80}}, // dir-download
"dir-download": {i: "\uf74c", c: [3]uint8{63, 197, 107}}, // dir-download
"dir-secure": {i: "\uf74f", c: [3]uint8{249, 169, 60}}, // dir-secure
"dir-images": {i: "\uf74e", c: [3]uint8{43, 150, 137}}, // dir-images
"dir-environment": {i: "\uf74e", c: [3]uint8{102, 187, 106}}, // dir-environment
@ -350,10 +267,10 @@ var Icon_Set = map[string]*Icon_Info{
// default icons in case nothing can be found
var Icon_Def = map[string]*Icon_Info{
"dir": {i: "\uf74a", c: [3]uint8{224, 177, 77}},
"diropen": {i: "\ufc6e", c: [3]uint8{224, 177, 77}},
"hiddendir": {i: "\uf755", c: [3]uint8{224, 177, 77}},
"exe": {i: "\uf713", c: [3]uint8{76, 175, 80}},
"file": {i: "\uf723", c: [3]uint8{65, 129, 190}},
"hiddenfile": {i: "\ufb12", c: [3]uint8{65, 129, 190}},
"dir": {i: "\uf74a", c: [3]uint8{248, 200, 89}},
"diropen": {i: "\ufc6e", c: [3]uint8{248, 200, 89}},
"hiddendir": {i: "\uf755", c: [3]uint8{248, 200, 89}},
"exe": {i: "\uf713", c: [3]uint8{63, 197, 107}},
"file": {i: "\uf723", c: [3]uint8{29, 161, 242}},
"hiddenfile": {i: "\uf40d", c: [3]uint8{63, 197, 107}},
}

View File

@ -9,16 +9,17 @@ import (
"sort"
"testing"
"github.com/Yash-Handa/logo-ls/assets"
"github.com/Yash-Handa/logo-ls/internal/ctw"
"golang.org/x/crypto/ssh/terminal"
"git.tcp.direct/milky/logo-ls/assets"
"git.tcp.direct/milky/logo-ls/internal/ctw"
"golang.org/x/term"
)
func TestFileIcons(t *testing.T) {
log.Println("Printing each supported file name and ext by the icon pack")
// get terminal width
terminalWidth, _, e := terminal.GetSize(int(os.Stdout.Fd()))
terminalWidth, _, e := term.GetSize(int(os.Stdout.Fd()))
if e != nil {
terminalWidth = 80
}
@ -62,7 +63,7 @@ func TestFileIcons(t *testing.T) {
func TestIconDisplay(t *testing.T) {
// get terminal width
terminalWidth, _, e := terminal.GetSize(int(os.Stdout.Fd()))
terminalWidth, _, e := term.GetSize(int(os.Stdout.Fd()))
if e != nil {
terminalWidth = 80
}

View File

@ -1,86 +0,0 @@
# The below list of icons are not included as are not currently supported by nerd fonts, If you are interested consider opening PRs on Nerd Fonts repo
icons:
- riot
- autoit
- livescript
- reason
- bucklescript
- mathematica
- wolframlanguage
- nunjucks
- haml
- cucumber
- vfl
- kl
- coldfusion
- cabal
- restql
- kivy
- graphcool
- sbt
- flow
- bithound
- appveyor
- fusebox
- editorconfig
- watchman
- aurelia
- rollup
- hack
- apollo
- nodemon
- webhint
- browserlist
- crystal
- snyk
- drone
- cuda
- dotjs
- sequelize
- gatsby
- wakatime
- circleci
- cloudfoundry
- processing
- wepy
- hcl
- san
- wallaby
- stencil
- red
- webassembly
- foxpro
- jupyter
- ballerina
- racket
- bazel
- mint
- velocity
- prisma
- abc
- istanbul
- lisp
- buildkite
- netlify
- svelte
- nest
- percy
- gitpod
- advpl_prw
- advpl_ptm
- advpl_tlpp
- advpl_include
- tilt
- capacitor
- adonis
- forth
- uml
- meson
- buck
- sml
- nrwl
- imba
- drawio
- sas
- slug

View File

@ -1,127 +0,0 @@
package main
import (
"bytes"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"testing"
)
type nodes []struct {
name string
textContent []byte
dirContent *nodes
}
func (n *nodes) create(t *testing.T, dir string) {
for _, f := range *n {
fn := filepath.Join(dir, f.name)
if f.textContent != nil {
if err := ioutil.WriteFile(fn, f.textContent, 0666); err != nil {
t.Fatal(err)
}
} else if f.dirContent != nil {
if err := os.Mkdir(fn, 0777); err != nil {
t.Log(err)
t.Fail()
continue
}
f.dirContent.create(t, fn)
}
}
}
func TestE2E(t *testing.T) {
goExec, err := exec.LookPath("go")
if err != nil {
t.Fatal(err)
}
dirEnv := filepath.Join("./testdata", "dirEnv")
os.RemoveAll(dirEnv)
// create a temp directory environment
if err := os.Mkdir(dirEnv, 0777); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(dirEnv)
// if you update the fileStruct or create any changes that may break the snapshorts present in ./testdata/logo-ls*.txt
// then you do have to update the snapshorts like: logo-ls -V > ./testdata/logo-ls-V.txt
fileStruct := nodes{
{name: "1test.go", textContent: []byte("package main\nimport \"fmt\"\nfunc main() {\n fmt.Println(\"Hello\")\n}")},
{name: "2test.js", textContent: []byte("consol.log('Hello')")},
{name: "test.routes.tsx", textContent: []byte("consol.log('Hello')")},
{name: "Dockerfile", textContent: []byte("FROM golang:1.15.2-buster AS base")},
{name: "abc.css", textContent: []byte("h1 {\n color : red;\n}")},
{name: "abc.sass", textContent: []byte("h1 {\n color : red;\n}")},
{name: ".abc.txt", textContent: []byte("Hello")},
{name: "3test.py", textContent: []byte("print('Hello')")},
{name: "testDir", dirContent: &nodes{
{name: "abc.txt", textContent: []byte("Hello")},
{name: "1test.go", textContent: []byte("package main\nimport \"fmt\"\nfunc main() {\n fmt.Println(\"Hello\")\n}")},
{name: "2test.js", textContent: []byte("consol.log('Hello')")},
}},
{name: ".privateDir", dirContent: &nodes{
{name: "abc.txt", textContent: []byte("Hello")},
{name: "1test.go", textContent: []byte("package main\nimport \"fmt\"\nfunc main() {\n fmt.Println(\"Hello\")\n}")},
{name: "2test.js", textContent: []byte("consol.log('Hello')")},
}},
{name: "Downloads", dirContent: &nodes{}},
}
fileStruct.create(t, dirEnv)
tt := []struct {
args []string
testFile string
td string
}{
{args: []string{"-1"}, testFile: "logo-ls.snap", td: "Testing normal execution"},
{args: []string{"-1a"}, testFile: "logo-ls-a.snap", td: "Testing -a (all) execution"},
{args: []string{"-1A"}, testFile: "logo-ls-A.snap", td: "Testing -A (almost all) execution"},
{args: []string{"-1i"}, testFile: "logo-ls-i.snap", td: "Testing -i (no icon) execution"},
{args: []string{"-1r"}, testFile: "logo-ls-r.snap", td: "Testing -r (reverse) execution"},
{args: []string{"-1sh"}, testFile: "logo-ls-sh.snap", td: "Testing -sh (human readable size) execution"},
{args: []string{"-1R"}, testFile: "logo-ls-R.snap", td: "Testing -R (recursive) execution"},
{args: []string{"-1Ra"}, testFile: "logo-ls-Ra.snap", td: "Testing -Ra (recursive, all) execution"},
{args: []string{"-1shRa"}, testFile: "logo-ls-shRa.snap", td: "Testing -shRa execution"},
{args: []string{"-V"}, testFile: "logo-ls-V.snap", td: "Testing -V option prints version"},
{args: []string{"-?"}, testFile: "logo-ls--help.snap", td: "Testing -? (help) prints help message"},
}
for _, test := range tt {
t.Run(test.td, func(st *testing.T) {
args := []string{"run", "."}
args = append(args, test.args...)
cmd := exec.Command(goExec, append(args, dirEnv)...)
stdout, err := cmd.StdoutPipe()
defer stdout.Close()
if err != nil {
st.Fatal(err)
}
if err := cmd.Start(); err != nil {
st.Fatal(err)
}
cmdData, err := ioutil.ReadAll(stdout)
if err != nil {
st.Fatal(err)
}
if err := cmd.Wait(); err != nil {
st.Fatal(err)
}
fileData, err := ioutil.ReadFile(filepath.Join("./testdata", test.testFile))
if err != nil {
st.Fatal(err)
}
if bytes.Compare(cmdData, fileData) != 0 {
t.Fatalf("expected output of the command:\n-----------\n%s\n=============\nbut got:\n-----------\n%s", fileData, cmdData)
}
})
}
}

38
go.mod
View File

@ -1,16 +1,30 @@
module github.com/Yash-Handa/logo-ls
module git.tcp.direct/milky/logo-ls
go 1.15
go 1.18
require (
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/go-git/go-git/v5 v5.2.0
github.com/imdario/mergo v0.3.11 // indirect
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
github.com/mattn/go-colorable v0.1.7
github.com/pborman/getopt/v2 v2.0.0
github.com/xanzy/ssh-agent v0.3.0 // indirect
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
golang.org/x/net v0.0.0-20201224014010-6772e930b67b // indirect
golang.org/x/sys v0.0.0-20201223074533-0d417f636930 // indirect
github.com/go-git/go-git/v5 v5.4.2
github.com/mattn/go-colorable v0.1.12
github.com/pborman/getopt/v2 v2.1.0
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467
)
require (
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20220714114130-e85cedf506cd // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.3.1 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/xanzy/ssh-agent v0.3.1 // indirect
golang.org/x/net v0.0.0-20220708220712-1185a9018129 // indirect
golang.org/x/sys v0.0.0-20220712014510-0a85c31ab51e // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)

126
go.sum
View File

@ -1,9 +1,13 @@
github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU=
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk=
github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs=
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA=
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
github.com/ProtonMail/go-crypto v0.0.0-20220714114130-e85cedf506cd h1:sOpOKHLKfQtb3L4c8NMK7dsUlQU8ILQ9KHX8EWD/VVE=
github.com/ProtonMail/go-crypto v0.0.0-20220714114130-e85cedf506cd/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=
github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
@ -12,109 +16,111 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0=
github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
github.com/go-git/go-billy/v5 v5.0.0 h1:7NQHvd9FVid8VL4qVUMm8XifBK+2xCoZ2lSk0agRrHM=
github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12 h1:PbKy9zOy4aAKrJ5pibIRpVO2BXnK1Tlcg+caKI7Ox5M=
github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw=
github.com/go-git/go-git/v5 v5.2.0 h1:YPBLG/3UK1we1ohRkncLjaXWLW+HKp5QNM/jTli2JgI=
github.com/go-git/go-git/v5 v5.2.0/go.mod h1:kh02eMX+wdqqxgNMEyq8YgwlIOsDOa9homkUq1PoTMs=
github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34=
github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
github.com/go-git/go-git-fixtures/v4 v4.2.1 h1:n9gGL1Ct/yIw+nfsfr8s4+sbhT+Ncu2SubfXjIWgci8=
github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0=
github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4=
github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc=
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg=
github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk=
github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY=
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck=
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw=
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A=
github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/pborman/getopt/v2 v2.0.0 h1:Tn8XVmhb93Wbc346Tk4P6KutfpMVp+iztUzkZrTSyB4=
github.com/pborman/getopt/v2 v2.0.0/go.mod h1:4NtW75ny4eBw9fO1bhtNdYTlZKYX5/tBLtsOpwKIKd0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pborman/getopt/v2 v2.1.0 h1:eNfR+r+dWLdWmV8g5OlpyrTYHkhVNxHBdN2cCrJmOEA=
github.com/pborman/getopt/v2 v2.1.0/go.mod h1:4NtW75ny4eBw9fO1bhtNdYTlZKYX5/tBLtsOpwKIKd0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70=
github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4=
github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
github.com/xanzy/ssh-agent v0.3.1 h1:AmzO1SSWxw73zxFZPRwaMN1MohDw8UyHnmuxyceTEGo=
github.com/xanzy/ssh-agent v0.3.1/go.mod h1:QIE4lCeL7nkC25x+yA3LBIYfwCc1TFziCtG7cBAac6w=
golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b h1:iFwSg7t5GZmB/Q5TjiEAsdoLDrdJRC1RiF2WhuV29Qw=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k=
golang.org/x/net v0.0.0-20220708220712-1185a9018129 h1:vucSRfWwTsoXro7P+3Cjlr6flUMtzCwzlvkxEQtHHB0=
golang.org/x/net v0.0.0-20220708220712-1185a9018129/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201223074533-0d417f636930 h1:vRgIt+nup/B/BwIS0g2oC0haq0iqbV3ZA+u6+0TlNCo=
golang.org/x/sys v0.0.0-20201223074533-0d417f636930/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220712014510-0a85c31ab51e h1:NHvCuwuS43lGnYhten69ZWqi2QOj/CiDNcKbVqwVoew=
golang.org/x/sys v0.0.0-20220712014510-0a85c31ab51e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM=
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@ -8,9 +8,10 @@ import (
"strconv"
"time"
"github.com/Yash-Handa/logo-ls/internal/sysState"
"git.tcp.direct/milky/logo-ls/internal/sysState"
"github.com/pborman/getopt/v2"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/term"
)
// flags with corresponding bit values
@ -219,7 +220,7 @@ func Bootstrap() {
case *f_1:
default:
// screen width for custom tw
w, _, e := terminal.GetSize(int(os.Stdout.Fd()))
w, _, e := term.GetSize(int(os.Stdout.Fd()))
if e == nil {
if w == 0 {
// for systems that dont support TIOCGWINSZ.
@ -258,8 +259,6 @@ func Bootstrap() {
// 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.7")
fmt.Println("\nWritten by Yash Handa")
os.Exit(sysState.GetExitCode())
}
}

View File

@ -4,8 +4,8 @@ import "strings"
var (
noColor string = "\033[0m"
green string = "\033[38;2;055;183;021m"
brown string = "\033[38;2;192;154;107m"
green string = "\033[38;2;062;215;107m"
dirty string = "\033[38;2;166;255;227m"
brailEmpty string = "\u2800"
)
@ -13,7 +13,7 @@ func DisplayColor(b bool) {
if b == false {
noColor = ""
green = ""
brown = ""
dirty = ""
}
}
@ -27,10 +27,10 @@ func getGitColor(gitStatus string) string {
switch strings.Trim(gitStatus, " ") {
case "":
return noColor
case "U":
case "🆕":
return green
default:
return brown
return dirty
}
}

View File

@ -13,10 +13,11 @@ import (
"strings"
"time"
"github.com/Yash-Handa/logo-ls/assets"
"github.com/Yash-Handa/logo-ls/internal/api"
"github.com/Yash-Handa/logo-ls/internal/ctw"
"github.com/Yash-Handa/logo-ls/internal/sysState"
"git.tcp.direct/milky/logo-ls/assets"
"git.tcp.direct/milky/logo-ls/internal/api"
"git.tcp.direct/milky/logo-ls/internal/ctw"
"git.tcp.direct/milky/logo-ls/internal/sysState"
"github.com/mattn/go-colorable"
)
@ -31,7 +32,7 @@ type file struct {
modeBits uint32
owner, group string // use syscall package
blocks int64 // blocks required by the file multiply buy 512 to get block size
// 'U'-> untracked file 'M'-> Modified file '●'-> modified dir ' '-> Not Updated/ not in git repo
// 'U'-> untracked file 🆕 'M'-> Modified file ⚙️ '●'-> modified dir ⚙️ ' '-> Not Updated/ not in git repo
gitStatus string
icon string
iconColor string

View File

@ -1,5 +1,6 @@
// this file contain dir type definition
//go:build !windows
// +build !windows
package dir
@ -10,7 +11,7 @@ import (
"strconv"
"syscall"
"github.com/Yash-Handa/logo-ls/internal/api"
"git.tcp.direct/milky/logo-ls/internal/api"
)
func dirBlocks(info *file, fi os.FileInfo) {

View File

@ -5,8 +5,8 @@ import (
"os"
"strings"
"github.com/Yash-Handa/logo-ls/assets"
"github.com/Yash-Handa/logo-ls/internal/api"
"git.tcp.direct/milky/logo-ls/assets"
"git.tcp.direct/milky/logo-ls/internal/api"
)
func mainSort(a, b string) bool {

View File

@ -99,13 +99,13 @@ func getFilesGitStatus(p string) map[string]string {
for j, seg := range dirs {
if j == len(dirs)-1 {
if v.Worktree == '?' {
t[i] = "U"
t[i] = "🆕"
} else {
t[i] = string(v.Worktree)
t[i] = "⚙️"
}
} else {
d += seg
t[d] = ""
t[d] = "⚙️"
}
}
}

Binary file not shown.

View File

@ -1,10 +0,0 @@
[ENVIRONMENT]
For correct display of icons the terminal should support UTF-8 encoding
with NERD FONT <https://github.com/ryanoasis/nerd-fonts> patched font.
For correct display of colors the terminal should support TRUE COLOR.
[REPORTING BUGS]
Report Bugs to <https://github.com/Yash-Handa/logo-ls/issues>
[SEE ALSO]
Full documentation with examples at: <https://www.github.com/Yash-Handa/logo-ls>

11
main.go
View File

@ -8,11 +8,12 @@ import (
"runtime"
"sort"
"github.com/Yash-Handa/logo-ls/assets"
"github.com/Yash-Handa/logo-ls/internal/api"
"github.com/Yash-Handa/logo-ls/internal/ctw"
"github.com/Yash-Handa/logo-ls/internal/dir"
"github.com/Yash-Handa/logo-ls/internal/sysState"
"git.tcp.direct/milky/logo-ls/assets"
"git.tcp.direct/milky/logo-ls/internal/api"
"git.tcp.direct/milky/logo-ls/internal/ctw"
"git.tcp.direct/milky/logo-ls/internal/dir"
"git.tcp.direct/milky/logo-ls/internal/sysState"
"github.com/mattn/go-colorable"
)

View File

@ -1,50 +0,0 @@
List information about the FILEs with ICONS and GIT STATUS (the current dir
by default). Sort entries alphabetically if none of -tvSUX is specified.
Usage: logo-ls [-1?aAcdDgGhiloRrSstUvVX] [-T value] [files ...]
-1 list one file per line.
-?, --help display this help and exit
-a, --all do not ignore entries starting with .
-A, --almost-all do not list implied . and ..
-c, --disable-color
don't color icons, filenames and git status (use this to
print to a file)
-d, --directory list directories themselves, not their contents
-D, --git-status print git status of files
-g like -l, but do not list owner
-G, --no-group in a long listing, don't print group names
-h, --human-readable
with -l and -s, print sizes like 1K 234M 2G etc.
-i, --disable-icon
don't print icons of the files
-l use a long listing format
-o like -l, but do not list group information
-R, --recursive list subdirectories recursively
-r, --reverse reverse order while sorting
-S sort by file size, largest first
-s, --size print the allocated size of each file, in blocks
-t sort by modification time, newest first
-T, --time-style=value
time/date format with -l; see time-style below [Stamp]
-U do not sort; list entries in directory order
-v natural sort of (version) numbers within text
-V, --version output version information and exit
-X sort alphabetically by entry extension
Possible value for --time-style (-T)
ANSIC "Mon Jan _2 15:04:05 2006"
UnixDate "Mon Jan _2 15:04:05 MST 2006"
RubyDate "Mon Jan 02 15:04:05 -0700 2006"
RFC822 "02 Jan 06 15:04 MST"
RFC822Z "02 Jan 06 15:04 -0700"
RFC850 "Monday, 02-Jan-06 15:04:05 MST"
RFC1123 "Mon, 02 Jan 2006 15:04:05 MST"
RFC1123Z "Mon, 02 Jan 2006 15:04:05 -0700"
RFC3339 "2006-01-02T15:04:05Z07:00"
Kitchen "3:04PM"
Stamp "Mon Jan _2 15:04:05" [Default]
StampMilli "Jan _2 15:04:05.000"
Exit status:
0 if OK,
1 if minor problems (e.g., cannot access subdirectory),
2 if serious trouble (e.g., cannot access command-line argument).

View File

@ -1,11 +0,0 @@
ﳑ1test.go
2test.js
3test.py
abc.css
abc.sass
.abc.txt
Dockerfile
Downloads/
.privateDir/
נּtest.routes.tsx
testDir/

View File

@ -1,17 +0,0 @@
ﱮ testdata/dirEnv:
ﳑ1test.go
2test.js
3test.py
abc.css
abc.sass
Dockerfile
Downloads/
נּtest.routes.tsx
testDir/
ﱮ testdata/dirEnv/Downloads:
ﱮ testdata/dirEnv/testDir:
ﳑ1test.go
2test.js
abc.txt

View File

@ -1,32 +0,0 @@
ﱮ testdata/dirEnv:
ﱮ.
ﱮ..
ﳑ1test.go
2test.js
3test.py
abc.css
abc.sass
.abc.txt
Dockerfile
Downloads/
.privateDir/
נּtest.routes.tsx
testDir/
ﱮ testdata/dirEnv/.privateDir:
ﱮ.
ﱮ..
ﳑ1test.go
2test.js
abc.txt
ﱮ testdata/dirEnv/Downloads:
ﱮ.
ﱮ..
ﱮ testdata/dirEnv/testDir:
ﱮ.
ﱮ..
ﳑ1test.go
2test.js
abc.txt

View File

@ -1,7 +0,0 @@
logo-ls v1.3.7
Copyright (c) 2020 Yash Handa
License MIT <https://opensource.org/licenses/MIT>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Yash Handa

View File

@ -1,13 +0,0 @@
ﱮ.
ﱮ..
ﳑ1test.go
2test.js
3test.py
abc.css
abc.sass
.abc.txt
Dockerfile
Downloads/
.privateDir/
נּtest.routes.tsx
testDir/

View File

@ -1,9 +0,0 @@
1test.go
2test.js
3test.py
abc.css
abc.sass
Dockerfile
Downloads/
test.routes.tsx
testDir/

View File

@ -1,9 +0,0 @@
testDir/
נּtest.routes.tsx
Downloads/
Dockerfile
abc.sass
abc.css
3test.py
2test.js
ﳑ1test.go

View File

@ -1,9 +0,0 @@
4.0Kﳑ1test.go
4.0K2test.js
4.0K3test.py
4.0Kabc.css
4.0Kabc.sass
4.0KDockerfile
4.0KDownloads/
4.0Kנּtest.routes.tsx
4.0KtestDir/

View File

@ -1,32 +0,0 @@
ﱮ testdata/dirEnv:
4.0Kﱮ.
4.0Kﱮ..
4.0Kﳑ1test.go
4.0K2test.js
4.0K3test.py
4.0Kabc.css
4.0Kabc.sass
4.0K.abc.txt
4.0KDockerfile
4.0KDownloads/
4.0K.privateDir/
4.0Kנּtest.routes.tsx
4.0KtestDir/
ﱮ testdata/dirEnv/.privateDir:
4.0Kﱮ.
4.0Kﱮ..
4.0Kﳑ1test.go
4.0K2test.js
4.0Kabc.txt
ﱮ testdata/dirEnv/Downloads:
4.0Kﱮ.
4.0Kﱮ..
ﱮ testdata/dirEnv/testDir:
4.0Kﱮ.
4.0Kﱮ..
4.0Kﳑ1test.go
4.0K2test.js
4.0Kabc.txt

View File

@ -1,9 +0,0 @@
ﳑ1test.go
2test.js
3test.py
abc.css
abc.sass
Dockerfile
Downloads/
נּtest.routes.tsx
testDir/