Просмотр исходного кода

Merge pull request #320 from MartinFillon/Add-autocomplete-manual-install

docs: Added instructions to install completions of eza to the readme
Christina Sørensen 2 лет назад
Родитель
Сommit
6b2308aaa2
1 измененных файлов с 49 добавлено и 22 удалено
  1. 49 22
      README.md

+ 49 - 22
README.md

@@ -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`.
 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):
 **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">
 <a id="try-it">
@@ -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 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`.
 If you want to pass arguments this way, use e.g. `nix run github:eza-community/eza -- -ol`.
 
 
@@ -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).
 key is in this repo under [deb.asc](/deb.asc).
 
 
 To install eza from this repo use:
 To install eza from this repo use:
+
 ```bash
 ```bash
 wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo tee /etc/apt/trusted.gpg.d/gierens.asc
 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
 echo "deb http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list
@@ -108,9 +109,11 @@ sudo apt install -y eza
 
 
 **Note:** on some systems like Docker containers apt might require the key
 **Note:** on some systems like Docker containers apt might require the key
 to be in dearmored format, then use this command instead:
 to be in dearmored format, then use this command instead:
+
 ```bash
 ```bash
 wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/gierens.asc
 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.
 before proceeding with the others from above.
 
 
 ### Nix (Linux, MacOS)
 ### Nix (Linux, MacOS)
@@ -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)
 [![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).
 Eza is available from [Homebrew](https://formulae.brew.sh/formula/eza#default).
 
 
 To install eza, run:
 To install eza, run:
@@ -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)
 [![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).
 Eza is available from [Scoop](https://scoop.sh/#/apps?q=eza&id=a52070d25f94bbcc884f80bef53eb47ed1268198).
 
 
 To install eza, run:
 To install eza, run:
@@ -209,7 +210,33 @@ To install eza, run:
 scoop install eza
 scoop install eza
 ```
 ```
 
 
+### 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.
 Click sections to expand.
 
 
 <a id="options">
 <a id="options">
@@ -313,22 +340,22 @@ Once Rust is installed, you can compile eza with Cargo:
     cargo test
     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`.
 - 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.
 - 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/).
 - 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.
 - 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.
 - 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) ❄️
 ### Developing on Nix (experimental) ❄️
 
 
@@ -337,12 +364,12 @@ If you have a working Nix installation with flake support, you can use nix to ma
     nix develop
     nix develop
 
 
 The Nix Flake has a few features:
 The Nix Flake has a few features:
+
 - Run `nix flake check` to run `treefmt` on the repo.
 - 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` and manually test `./results/bin/eza -- <arguments>` for easy debugging.
 - Run `nix build .#test` to run `cargo test` via the flake.
 - Run `nix build .#test` to run `cargo test` via the flake.
 - Run `nix build .#clippy` to lint with clippy (still work in progress).
 - Run `nix build .#clippy` to lint with clippy (still work in progress).
 
 
-
 ## Star History
 ## 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)
 [![Star History Chart](https://api.star-history.com/svg?repos=eza-community/eza&type=Date)](https://star-history.com/#eza-community/eza&Date)