mirror of
https://github.com/Yash-Handa/logo-ls.git
synced 2026-08-27 18:14:48 -05:00
Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1041ec04a5 | ||
|
|
830934334c | ||
|
|
2462e8de10 | ||
|
|
601e3567d7 | ||
|
|
13a45eb843 | ||
|
|
e0b7546408 | ||
|
|
1b719af25b | ||
|
|
8606cb53e0 | ||
|
|
7e1e31f87f | ||
|
|
8f2e99cccd | ||
|
|
a59d69ec3a | ||
|
|
f776e08b70 | ||
|
|
28797b6281 | ||
|
|
60585a6a50 | ||
|
|
6ebebf05d6 | ||
|
|
ba0f74c973 | ||
|
|
43b0e86ef2 | ||
|
|
3c630eb4e5 |
@@ -1,9 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# build the binery
|
||||
go build
|
||||
|
||||
# Update HELP.md file
|
||||
echo -e "\`\`\`txt" > HELP.md
|
||||
go run . -? >> 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
|
||||
|
||||
+35
-35
@@ -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
|
||||
|
||||
@@ -17,3 +17,10 @@
|
||||
# Do not commit the executable
|
||||
logo-ls
|
||||
build/
|
||||
|
||||
# distribution directory
|
||||
dist
|
||||
|
||||
# env stuff
|
||||
*.env
|
||||
.gh_token
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
# 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: '{{ .Env.PWD }}.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"
|
||||
@@ -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
|
||||
@@ -1,7 +1,9 @@
|
||||
```txt
|
||||
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.
|
||||
-? display this help and exit
|
||||
-?, --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
|
||||
@@ -30,16 +32,21 @@ Usage: logo-ls [-1?aAcdDgGhiloRrSstUvVX] [-T value] [files ...]
|
||||
-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"
|
||||
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).
|
||||
```
|
||||
|
||||
@@ -1,9 +1,151 @@
|
||||

|
||||

|
||||

|
||||
|
||||
# logo-ls
|
||||
|
||||
modern ls command with vscode like file logos. Written in Golang
|
||||

|
||||

|
||||

|
||||
[](http://hits.dwyl.com/{Yash-Handa}/{logo-ls})
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
modern ls command with beautiful Icons and Git Integrations . Written in Golang
|
||||
|
||||
Command and Arguments supported are listed in [HELP.md](/HELP.md)
|
||||
|
||||
## Table of contents
|
||||
|
||||
- [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)
|
||||
- [Installation](#installation)
|
||||
- [Recommended configurations](#recommended-configurations)
|
||||
- [Updating](#updating)
|
||||
- [Uninstallation](#uninstallation)
|
||||
- [Icon Set](#icon-set)
|
||||
- [Contributing](#contributing)
|
||||
- [License](#license)
|
||||
|
||||
## Features
|
||||
|
||||
This project is build to add esthetics to ls(coreutiles) command
|
||||
|
||||
- Over 250+ icons
|
||||
- Supporting 600+ files, extensions and directories
|
||||
- 16 Million, true colors supported
|
||||
- Git Status Integration
|
||||
- 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
|
||||
|
||||
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
|
||||
- With `-a` (or) `--all` : Does not ignore entries starting with '.'
|
||||
- With `-A` (or) `--almost-all` : Does not ignore entries starting with '.', except `./` and `../`
|
||||
- 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.
|
||||
- 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
|
||||
- With `-R` (or) `--recursive`: list subdirectories recursively
|
||||
- With `-?` (or) `--help`: print the help message
|
||||
- similar message can be found at [HELP.md](/HELP.md).
|
||||
- **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
|
||||
- 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).
|
||||
- With `-i` (or) `--disable-icon`: don't print icons of the files
|
||||
- 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`
|
||||
|
||||
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.
|
||||
|
||||
### Multiple Files and Directories
|
||||
|
||||
You can provide multiple files and directories as command argument [default to PWD] and all will be displayed accordingly.
|
||||
|
||||
### Check the downloaded Resource
|
||||
|
||||
receive public key of the signing party
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
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 didn’t match, the signature would be reported as **BAD**)
|
||||
|
||||
Now use `logo-ls_SHA512sums.txt` file to verify the authenticity of the resource downloaded
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
Note: The downloaded resources to verify and `logo-ls_SHA512sums.txt` should be in the same directory
|
||||
|
||||
## Recommended configurations
|
||||
|
||||
## Updating
|
||||
|
||||
## Uninstallation
|
||||
|
||||
## Example Commands
|
||||
|
||||
<div>
|
||||
@@ -55,3 +197,7 @@ Command and Arguments supported are listed in [HELP.md](/HELP.md)
|
||||
<img alt="icons" title="Icon Set" src="/.github/images/icons.png">
|
||||
</span>
|
||||
</div><br>
|
||||
|
||||
## Contributing
|
||||
|
||||
## License
|
||||
|
||||
Binary file not shown.
+10
@@ -0,0 +1,10 @@
|
||||
[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>
|
||||
@@ -102,7 +102,7 @@ func main() {
|
||||
f_R := getopt.BoolLong("recursive", 'R', "list subdirectories recursively")
|
||||
f_T := getopt.EnumLong("time-style", 'T', []string{"Stamp", "StampMilli", "Kitchen", "ANSIC", "UnixDate", "RubyDate", "RFC1123", "RFC1123Z", "RFC3339", "RFC822", "RFC822Z", "RFC850"}, "Stamp", "time/date format with -l; see time-style below")
|
||||
|
||||
f_help := getopt.Bool('?', "display this help and exit")
|
||||
f_help := getopt.BoolLong("help", '?', "display this help and exit")
|
||||
f_V := getopt.BoolLong("version", 'V', "output version information and exit")
|
||||
|
||||
// using getopt.Getopt instead of parse to provide custom err
|
||||
@@ -115,26 +115,35 @@ func main() {
|
||||
|
||||
// if f_help is provided print help and exit(0)
|
||||
if *f_help {
|
||||
fmt.Println("List information about the FILEs with ICONS and GIT STATUS (the current dir \nby default). Sort entries alphabetically if none of -tvSUX is specified.")
|
||||
|
||||
getopt.PrintUsage(os.Stdout)
|
||||
|
||||
fmt.Println("\nPossible value for --time-style (-T)")
|
||||
fmt.Printf("%-11s %-32q\n", "ANSIC", "Mon Jan _2 15:04:05 2006")
|
||||
fmt.Printf("%-11s %-32q\n", "UnixDate", "Mon Jan _2 15:04:05 MST 2006")
|
||||
fmt.Printf("%-11s %-32q\n", "RubyDate", "Mon Jan 02 15:04:05 -0700 2006")
|
||||
fmt.Printf("%-11s %-32q\n", "RFC822", "02 Jan 06 15:04 MST")
|
||||
fmt.Printf("%-11s %-32q\n", "RFC822Z", "02 Jan 06 15:04 -0700")
|
||||
fmt.Printf("%-11s %-32q\n", "RFC850", "Monday, 02-Jan-06 15:04:05 MST")
|
||||
fmt.Printf("%-11s %-32q\n", "RFC1123", "Mon, 02 Jan 2006 15:04:05 MST")
|
||||
fmt.Printf("%-11s %-32q\n", "RFC1123Z", "Mon, 02 Jan 2006 15:04:05 -0700")
|
||||
fmt.Printf("%-11s %-32q\n", "RFC3339", "2006-01-02T15:04:05Z07:00")
|
||||
fmt.Printf("%-11s %-32q\n", "Kitchen", "3:04PM")
|
||||
fmt.Printf("%-11s %-32q [Default]\n", "Stamp", "Mon Jan _2 15:04:05")
|
||||
fmt.Printf("%-11s %-32q\n", "StampMilli", "Jan _2 15:04:05.000")
|
||||
fmt.Printf(" %-11s %-32q\n", "ANSIC", "Mon Jan _2 15:04:05 2006")
|
||||
fmt.Printf(" %-11s %-32q\n", "UnixDate", "Mon Jan _2 15:04:05 MST 2006")
|
||||
fmt.Printf(" %-11s %-32q\n", "RubyDate", "Mon Jan 02 15:04:05 -0700 2006")
|
||||
fmt.Printf(" %-11s %-32q\n", "RFC822", "02 Jan 06 15:04 MST")
|
||||
fmt.Printf(" %-11s %-32q\n", "RFC822Z", "02 Jan 06 15:04 -0700")
|
||||
fmt.Printf(" %-11s %-32q\n", "RFC850", "Monday, 02-Jan-06 15:04:05 MST")
|
||||
fmt.Printf(" %-11s %-32q\n", "RFC1123", "Mon, 02 Jan 2006 15:04:05 MST")
|
||||
fmt.Printf(" %-11s %-32q\n", "RFC1123Z", "Mon, 02 Jan 2006 15:04:05 -0700")
|
||||
fmt.Printf(" %-11s %-32q\n", "RFC3339", "2006-01-02T15:04:05Z07:00")
|
||||
fmt.Printf(" %-11s %-32q\n", "Kitchen", "3:04PM")
|
||||
fmt.Printf(" %-11s %-32q [Default]\n", "Stamp", "Mon Jan _2 15:04:05")
|
||||
fmt.Printf(" %-11s %-32q\n", "StampMilli", "Jan _2 15:04:05.000")
|
||||
|
||||
fmt.Println("\nExit status:")
|
||||
fmt.Println(" 0 if OK,")
|
||||
fmt.Println(" 1 if minor problems (e.g., cannot access subdirectory),")
|
||||
fmt.Println(" 2 if serious trouble (e.g., cannot access command-line argument).")
|
||||
os.Exit(osExitCode)
|
||||
}
|
||||
|
||||
// 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.3")
|
||||
fmt.Println("\nWritten by Yash Handa")
|
||||
os.Exit(osExitCode)
|
||||
}
|
||||
|
||||
@@ -338,7 +347,6 @@ func main() {
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.Printf("\n\n")
|
||||
os.Exit(osExitCode)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user