Skip to content

Commit

Permalink
Merge branch 'main' into pr-908
Browse files Browse the repository at this point in the history
  • Loading branch information
PThorpe92 authored Sep 14, 2023
2 parents 3d1fe7d + 9f05854 commit 469f69f
Show file tree
Hide file tree
Showing 50 changed files with 606 additions and 54 deletions.
143 changes: 143 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,146 @@

All notable changes to this project will be documented in this file.

## [0.12.0] - 2023-09-14

### Bug Fixes

- Expand `--all` help
- RUSTSEC-2020-0071
- Generalize gitignore to ignore all eza deb packages
- Canonicalize errors when the destination of a symbolic link is bad
- Handle other canonicalize errors in hyperlinks and git
- Fix windows build when canonicalize returns an error
- Change trycmd config to use test/itest folder for testing
- Revert to old apt install command suggestion and add hint
- Remove stray backslashes
- Is_some_and is an unstable Rust feature until 1.70
- Revert "Support for Windows Hidden Files"
- Shellcheck warnings
- Revert "Support for Windows Hidden Files"
- Shellcheck warnings
- Exit 13 on os error 13
- Rewrite comment
- Improve trace strings
- Tracing typo

### Documentation

- Expand `--all` documentation
- Add pthorpe92 gist
- Remove xtests section from readme
- Add deprecation warning to xtests/readme
- Add deprecation warning to just xtest commands
- Add deprecation warning to vagrantfile
- Add MacPorts install info
- Add gentoo
- Fix gentoo install
- Add docs for --git-repos & --git-repos-no-status
- Fix gpg armor flag for deb release in readme
- Add better explanation of git repos + no status
- Add scoop install info
- Remove color specifications. change unknown git repo status to `~`
- Fix missing color specification from man page

### Features

- Add audit workflow
- Add trycmd as dev-dependency
- Add minimal trycmd binary
- Add a few trycmd tests as example
- Document and change output for --git-repos
- Add apt installation workflow
- Adds filtering on Windows hidden files
- Adds filtering on Windows hidden files
- Adds filtering on Windows hidden files
- Added shellcheck to treefmt
- Adds filtering on Windows hidden files
- Add PERMISSION_DENIED exit code

### Miscellaneous Tasks

- Bump chrono from 0.4.27 to 0.4.30
- Removal of xtests
- Removal of vagrant
- Remove deprecated devtools
- Run spellcheck

### Refactor

- Over-engineer deb-package.sh
- Hide xtests folder
- Split trycmd into tests for all, unix and windows
- Limit unit-tests run on workflow change to unit-tests itself
- Moved generateTest.sh to devtools/
- Renamed the file
- Add tracing to various code parts
- Make std::process::exit global

### Revert

- "Support for Windows Hidden Files"

### Styling

- Remove TODO message on the absolute_path property
- Fix shellcheck issues in deb-package.sh
- Fix shellcheck issues in deb-package.sh
- Fix shellcheck issues in deb-package.sh

### Testing

- Remove vhs from flake
- Remove vhs-runner files
- Dump trycmd from nix sandbox
- Fix name of trydump
- Add trycmd
- Add nix feature
- Add example long tests for sandbox
- Set itests files to unix epoch
- Set itest files to unix epoch
- Refactor setting unix epoch
- Auto discard old definitions
- Fix test reference
- Add long_all_nix.toml
- Add long_blocksize_nix.toml
- Add long_extended_nix.toml
- Add long_git_nix.toml
- Add long_git_repos_nix.toml
- Add long_git_repos_no_status_nix.toml
- Add long_grid_nix.toml
- Add long_header_nix.toml
- Add long_icons_nix.toml
- Add long_octal_nix.toml
- Add long_time_style_relative_nix.toml
- Freeze nix tests
- Fix trydump when no files to delete
- Adding more content to test
- Modified unix and all tests
- Regenerate nix tests
- Convert windows tests with new itest dir
- Fixed windows tests being wrong
- Added a test generator
- Add more unix_tests
- Fixed unix tests to remove any distro specific
- Removed git test breaking on nix

### Build

- Add compression, checksum gen for bin
- Update flake.lock, cargo.lock
- Add deny.toml
- Remove org warnings
- Remove itest
- Update flake.lock
- Add itest, idump
- Make trycmd part of checks

### Ci

- Don't use nix feature on ci
- Enforce conventional commits
- Enforce conventional commits

## [0.11.1] - 2023-09-11

### Bug Fixes
Expand Down Expand Up @@ -37,6 +177,8 @@ All notable changes to this project will be documented in this file.
### Miscellaneous Tasks

- Bump actions/checkout from 3 to 4
- Bump uzers to v0.11.3
- Release 0.11.1

### Testing

Expand Down Expand Up @@ -174,6 +316,7 @@ All notable changes to this project will be documented in this file.
- Cafkafk -> eza-community
- Add gpg public key for the deb repository
- Add section about debian and ubuntu installation
- Add guidelines for commit messages

### Features

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ authors = ["Christina Sørensen <christina@cafkafk.com>"]
categories = ["command-line-utilities"]
edition = "2021"
rust-version = "1.65.0"
exclude = ["/devtools/*", "/Justfile", "/Vagrantfile", "/screenshots.png"]
exclude = ["/devtools/*", "/Justfile", "/Vagrantfile", "/screenshots.png", "/tests"]
readme = "README.md"
homepage = "https://github.com/eza-community/eza"
license = "MIT"
repository = "https://github.com/eza-community/eza"
version = "0.11.1"
version = "0.12.0"


[package.metadata.deb]
Expand All @@ -25,6 +25,7 @@ assets = [
[ "target/release/eza", "/usr/bin/eza", "0755" ],
[ "target/release/../man/eza.1", "/usr/share/man/man1/eza.1", "0644" ],
[ "target/release/../man/eza_colors.5", "/usr/share/man/man5/eza_colors.5", "0644" ],
[ "target/release/../man/eza_colors-explanation.5", "/usr/share/man/man5/eza_colors-explanation.5", "0644" ],
[ "completions/bash/eza", "/usr/share/bash-completion/completions/eza", "0644" ],
[ "completions/zsh/_eza", "/usr/share/zsh/site-functions/_eza", "0644" ],
[ "completions/fish/eza.fish", "/usr/share/fish/vendor_completions.d/eza.fish", "0644" ],
Expand Down
73 changes: 51 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ And it’s **small**, **fast**, and just **one single binary**.

By deliberately making some decisions differently, eza attempts to be a more featureful, more user-friendly version of `ls`.


---

**eza** features not in exa (non-exhaustive):

- Fixes [“The Grid Bug”](https://github.com/eza-community/eza/issues/66#issuecomment-1656758327) introduced in exa 2021.
- Hyperlink support.
- Mount point details.
- Selinux context output.
- Git repo status output.
- Human readable relative dates.
- Several security fixes.
- Many smaller bug fixes/changes!
- Support for `bright` terminal colours.
- Fixes [“The Grid Bug”](https://github.com/eza-community/eza/issues/66#issuecomment-1656758327) introduced in exa 2021.
- Hyperlink support.
- Mount point details.
- Selinux context output.
- Git repo status output.
- Human readable relative dates.
- Several security fixes.
- Support for `bright` terminal colours.
- Many smaller bug fixes/changes!

---

<a id="try-it">
Expand All @@ -53,7 +53,7 @@ If you already have Nix setup with flake support, you can try out eza with the `

nix run github:eza-community/eza

Nix will build eza and run it.
Nix will build eza and run it.

If you want to pass arguments this way, use e.g. `nix run github:eza-community/eza -- -ol`.

Expand Down Expand Up @@ -99,6 +99,7 @@ Eza is available from [deb.gierens.de](http://deb.gierens.de). The GPG public
key is in this repo under [deb.asc](/deb.asc).

To install eza from this repo use:

```bash
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo tee /etc/apt/trusted.gpg.d/gierens.asc
echo "deb http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list
Expand All @@ -108,9 +109,11 @@ sudo apt install -y eza

**Note:** on some systems like Docker containers apt might require the key
to be in dearmored format, then use this command instead:

```bash
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/gierens.asc
```

before proceeding with the others from above.

### Nix (Linux, MacOS)
Expand Down Expand Up @@ -175,7 +178,6 @@ The preceding repository also contains the Bash, Fish, and Zsh completions.

[![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/eza.svg)](https://repology.org/project/eza/versions)


Eza is available from [Homebrew](https://formulae.brew.sh/formula/eza#default).

To install eza, run:
Expand All @@ -200,7 +202,6 @@ sudo port install eza

[![Windows package](https://repology.org/badge/version-for-repo/scoop/eza.svg)](https://repology.org/project/eza/versions)


Eza is available from [Scoop](https://scoop.sh/#/apps?q=eza&id=a52070d25f94bbcc884f80bef53eb47ed1268198).

To install eza, run:
Expand All @@ -209,7 +210,35 @@ To install eza, run:
scoop install eza
```

### Completions

#### For zsh:

> **Note**
> Change `~/.zshrc` to your preferred zsh config file.
##### Clone the repository:

```sh
git clone https://github.com/eza-community/eza.git
```

##### Add the completion path to your zsh configuration:

Replace `<path_to_eza>` with the actual path where you cloned the `eza` repository.

```sh
echo 'export FPATH="<path_to_eza>/completions/zsh:$FPATH"' >> ~/.zshrc
```

##### Reload your zsh configuration:

```sh
source ~/.zshrc
```

---

Click sections to expand.

<a id="options">
Expand Down Expand Up @@ -313,22 +342,22 @@ Once Rust is installed, you can compile eza with Cargo:
cargo test

- The [just](https://github.com/casey/just) command runner can be used to run some helpful development commands, in a manner similar to `make`.
Run `just --list` to get an overview of what’s available.
Run `just --list` to get an overview of what’s available.

- If you are compiling a copy for yourself, be sure to run `cargo build --release` or `just build-release` to benefit from release-mode optimisations.
Copy the resulting binary, which will be in the `target/release` directory, into a folder in your `$PATH`.
`/usr/local/bin` is usually a good choice.
Copy the resulting binary, which will be in the `target/release` directory, into a folder in your `$PATH`.
`/usr/local/bin` is usually a good choice.

- To compile and install the manual pages, you will need [pandoc](https://pandoc.org/).
The `just man` command will compile the Markdown into manual pages, which it will place in the `target/man` directory.
To use them, copy them into a directory that `man` will read.
`/usr/local/share/man` is usually a good choice.
The `just man` command will compile the Markdown into manual pages, which it will place in the `target/man` directory.
To use them, copy them into a directory that `man` will read.
`/usr/local/share/man` is usually a good choice.

- eza depends on [libgit2](https://github.com/rust-lang/git2-rs) for certain features.
If you’re unable to compile libgit2, you can opt out of Git support by running `cargo build --no-default-features`.
If you’re unable to compile libgit2, you can opt out of Git support by running `cargo build --no-default-features`.

- If you intend to compile for musl, you will need to use the flag `vendored-openssl` if you want to get the Git feature working.
The full command is `cargo build --release --target=x86_64-unknown-linux-musl --features vendored-openssl,git`.
The full command is `cargo build --release --target=x86_64-unknown-linux-musl --features vendored-openssl,git`.

### Developing on Nix (experimental) ❄️

Expand All @@ -337,12 +366,12 @@ If you have a working Nix installation with flake support, you can use nix to ma
nix develop

The Nix Flake has a few features:

- Run `nix flake check` to run `treefmt` on the repo.
- Run `nix build` and manually test `./results/bin/eza -- <arguments>` for easy debugging.
- Run `nix build .#test` to run `cargo test` via the flake.
- Run `nix build .#clippy` to lint with clippy (still work in progress).


## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=eza-community/eza&type=Date)](https://star-history.com/#eza-community/eza&Date)
43 changes: 43 additions & 0 deletions devtools/generate-trycmd-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

# Generate test data for the program

if [ $# -ne 2 ]; then
echo "Usage: $0 <test name> <test argument>"
exit 1
fi

# Clean up previous test data

if [ -f tests/cmd/"$1".toml ]; then
rm tests/cmd/"$1".toml
fi

if [ -f tests/cmd/"$1".stdout ]; then
rm tests/cmd/"$1".stdout
fi

if [ -f tests/cmd/"$1".stderr ]; then
rm tests/cmd/"$1".stderr
fi

# Generate test data

touch tests/cmd/"$1".toml

echo 'bin.name = "eza"' >> tests/cmd/"$1".toml
echo 'args = "'"$2"'"' >> tests/cmd/"$1".toml

# Generate expected output

if [ -f target/debug/eza ]; then
target/debug/eza "$2" > tests/cmd/"$1".stdout 2> tests/cmd/"$1".stderr
returncode=$?
if [ $returncode -ne 0 ]; then
echo -e 'status.code = '$returncode'' >> tests/cmd/"$1".toml
exit 0
fi
else
echo "Please build the program first"
exit 1
fi
Loading

0 comments on commit 469f69f

Please sign in to comment.