Adding formatting stuff to readme.
This commit is contained in:
parent
76de09044c
commit
6703fc8b82
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
(NOTE: This is sample readme.md content below. Do not do anything with this yet.)
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
`extract-wisdom` (`extwis`) is a [Fabric](https://github.com/danielmiessler/fabric) pattern that _extracts wisdom_ from any text. For example:
|
`extract-wisdom` (`extwis`) is a [Fabric](https://github.com/danielmiessler/fabric) pattern that _extracts wisdom_ from any text. For example:
|
||||||
@ -28,161 +30,17 @@
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
## Options
|
You can install `extractwisdom` by executing this command.
|
||||||
|
|
||||||
## Meta
|
|
||||||
|
|
||||||
- Author: Daniel Miessler
|
|
||||||
- Published: January 5, 2024
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
![Tutorial][tutorial]
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
z foo # cd into highest ranked directory matching foo
|
curl -sS https://raw.githubusercontent.com/danielmiessler/fabric/main/install.sh | bash
|
||||||
z foo bar # cd into highest ranked directory matching foo and bar
|
|
||||||
z foo / # cd into a subdirectory starting with foo
|
|
||||||
|
|
||||||
z ~/foo # z also works like a regular cd command
|
|
||||||
z foo/ # cd into relative path
|
|
||||||
z .. # cd one level up
|
|
||||||
z - # cd into previous directory
|
|
||||||
|
|
||||||
zi foo # cd with interactive selection (using fzf)
|
|
||||||
|
|
||||||
z foo<SPACE><TAB> # show interactive completions (zoxide v0.8.0+, bash 4.4+/fish/zsh only)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Read more about the matching algorithm [here][algorithm-matching].
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
> ```sh
|
|
||||||
> curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash
|
|
||||||
> ```
|
|
||||||
>
|
|
||||||
> zoxide can be installed in 4 easy steps:
|
|
||||||
|
|
||||||
1. **Install binary**
|
|
||||||
|
|
||||||
zoxide runs on most major platforms. If your platform isn't listed below,
|
|
||||||
please [open an issue][issues].
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Linux</summary>
|
|
||||||
|
|
||||||
> The recommended way to install zoxide is via the install script:
|
|
||||||
>
|
|
||||||
> ```sh
|
|
||||||
> curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash
|
|
||||||
> ```
|
|
||||||
>
|
|
||||||
> Or, you can use a package manager:
|
|
||||||
>
|
|
||||||
> | Distribution | Repository | Instructions |
|
|
||||||
> | ------------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
||||||
> | **_Any_** | **[crates.io]** | `cargo install zoxide --locked` |
|
|
||||||
> | _Any_ | [asdf] | `asdf plugin add zoxide https://github.com/nyrst/asdf-zoxide.git` <br /> `asdf install zoxide latest` |
|
|
||||||
> | _Any_ | [conda-forge] | `conda install -c conda-forge zoxide` |
|
|
||||||
> | _Any_ | [Linuxbrew] | `brew install zoxide` |
|
|
||||||
> | _Any_ | [nixpkgs] | `nix-env -iA nixpkgs.zoxide` |
|
|
||||||
> | Alpine Linux 3.13+ | [Alpine Linux Packages] | `apk add zoxide` |
|
|
||||||
> | Arch Linux | [Arch Linux Extra] | `pacman -S zoxide` |
|
|
||||||
> | CentOS 7+ | [Copr] | `dnf copr enable atim/zoxide` <br /> `dnf install zoxide` |
|
|
||||||
> | Debian 11+[^1] | [Debian Packages] | `apt install zoxide` |
|
|
||||||
> | Devuan 4.0+[^1] | [Devuan Packages] | `apt install zoxide` |
|
|
||||||
> | Fedora 32+ | [Fedora Packages] | `dnf install zoxide` |
|
|
||||||
> | Gentoo | [GURU Overlay] | `eselect repository enable guru` <br /> `emerge --sync guru` <br /> `emerge app-shells/zoxide` |
|
|
||||||
> | Manjaro | | `pacman -S zoxide` |
|
|
||||||
> | openSUSE Tumbleweed | [openSUSE Factory] | `zypper install zoxide` |
|
|
||||||
> | Parrot OS[^1] | | `apt install zoxide` |
|
|
||||||
> | Raspbian 11+[^1] | [Raspbian Packages] | `apt install zoxide` |
|
|
||||||
> | Rhino Linux | [Pacstall Packages] | `pacstall -I zoxide-deb` |
|
|
||||||
> | Slackware 15.0+ | [SlackBuilds] | [Instructions][slackbuilds-howto] |
|
|
||||||
> | Ubuntu 21.04+[^1] | [Ubuntu Packages] | `apt install zoxide` |
|
|
||||||
> | Void Linux | [Void Linux Packages] | `xbps-install -S zoxide` |
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>macOS</summary>
|
|
||||||
|
|
||||||
> To install zoxide, use a package manager:
|
|
||||||
>
|
|
||||||
> | Repository | Instructions |
|
|
||||||
> | --------------- | ----------------------------------------------------------------------------------------------------- |
|
|
||||||
> | **[crates.io]** | `cargo install zoxide --locked` |
|
|
||||||
> | **[Homebrew]** | `brew install zoxide` |
|
|
||||||
> | [asdf] | `asdf plugin add zoxide https://github.com/nyrst/asdf-zoxide.git` <br /> `asdf install zoxide latest` |
|
|
||||||
> | [conda-forge] | `conda install -c conda-forge zoxide` |
|
|
||||||
> | [MacPorts] | `port install zoxide` |
|
|
||||||
> | [nixpkgs] | `nix-env -iA nixpkgs.zoxide` |
|
|
||||||
>
|
|
||||||
> Or, run this command in your terminal:
|
|
||||||
>
|
|
||||||
> ```sh
|
|
||||||
> curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash
|
|
||||||
> ```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Windows</summary>
|
|
||||||
|
|
||||||
> The recommended way to install zoxide is via `winget`:
|
|
||||||
>
|
|
||||||
> ```sh
|
|
||||||
> winget install ajeetdsouza.zoxide
|
|
||||||
> ```
|
|
||||||
>
|
|
||||||
> Or, you can use an alternative package manager:
|
|
||||||
>
|
|
||||||
> | Repository | Instructions |
|
|
||||||
> | --------------- | ------------------------------------- |
|
|
||||||
> | **[crates.io]** | `cargo install zoxide --locked` |
|
|
||||||
> | [Chocolatey] | `choco install zoxide` |
|
|
||||||
> | [conda-forge] | `conda install -c conda-forge zoxide` |
|
|
||||||
> | [Scoop] | `scoop install zoxide` |
|
|
||||||
>
|
|
||||||
> If you're using Cygwin, Git Bash, or MSYS2, use the install script instead:
|
|
||||||
>
|
|
||||||
> ```sh
|
|
||||||
> curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash
|
|
||||||
> ```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>BSD</summary>
|
|
||||||
|
|
||||||
> To install zoxide, use a package manager:
|
|
||||||
>
|
|
||||||
> | Distribution | Repository | Instructions |
|
|
||||||
> | ------------- | --------------- | ------------------------------- |
|
|
||||||
> | **_Any_** | **[crates.io]** | `cargo install zoxide --locked` |
|
|
||||||
> | DragonFly BSD | [DPorts] | `pkg install zoxide` |
|
|
||||||
> | FreeBSD | [FreshPorts] | `pkg install zoxide` |
|
|
||||||
> | NetBSD | [pkgsrc] | `pkgin install zoxide` |
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Android</summary>
|
|
||||||
|
|
||||||
> To install zoxide, use a package manager:
|
|
||||||
>
|
|
||||||
> | Repository | Instructions |
|
|
||||||
> | ---------- | -------------------- |
|
|
||||||
> | [Termux] | `pkg install zoxide` |
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### Flags
|
### Flags
|
||||||
|
|
||||||
When calling `zoxide init`, the following flags are available:
|
When calling `extractwisdom`, the following flags are available:
|
||||||
|
|
||||||
- `--cmd`
|
- `--cmd`
|
||||||
- Changes the prefix of the `z` and `zi` commands.
|
- Changes the prefix of the `z` and `zi` commands.
|
||||||
@ -200,38 +58,28 @@ When calling `zoxide init`, the following flags are available:
|
|||||||
- These functions will still be available in your shell as `__zoxide_z` and
|
- These functions will still be available in your shell as `__zoxide_z` and
|
||||||
`__zoxide_zi`, should you choose to redefine them.
|
`__zoxide_zi`, should you choose to redefine them.
|
||||||
|
|
||||||
### Environment variables
|
## Options
|
||||||
|
|
||||||
Environment variables[^2] can be used for configuration. They must be set before
|
## Example
|
||||||
`zoxide init` is called.
|
|
||||||
|
|
||||||
- `_ZO_DATA_DIR`
|
```sh
|
||||||
- Specifies the directory in which the database is stored.
|
z foo # cd into highest ranked directory matching foo
|
||||||
- The default value varies across OSes:
|
z foo bar # cd into highest ranked directory matching foo and bar
|
||||||
| OS | Path | Example |
|
z foo / # cd into a subdirectory starting with foo
|
||||||
| ----------- | ---------------------------------------- | ------------------------------------------ |
|
|
||||||
| Linux / BSD | `$XDG_DATA_HOME` or `$HOME/.local/share` | `/home/alice/.local/share` |
|
z ~/foo # z also works like a regular cd command
|
||||||
| macOS | `$HOME/Library/Application Support` | `/Users/Alice/Library/Application Support` |
|
z foo/ # cd into relative path
|
||||||
| Windows | `%LOCALAPPDATA%` | `C:\Users\Alice\AppData\Local` |
|
z .. # cd one level up
|
||||||
- `_ZO_ECHO`
|
z - # cd into previous directory
|
||||||
- When set to 1, `z` will print the matched directory before navigating to
|
|
||||||
it.
|
zi foo # cd with interactive selection (using fzf)
|
||||||
- `_ZO_EXCLUDE_DIRS`
|
|
||||||
- Excludes the specified directories from the database.
|
z foo<SPACE><TAB> # show interactive completions (zoxide v0.8.0+, bash 4.4+/fish/zsh only)
|
||||||
- This is provided as a list of [globs][glob], separated by OS-specific
|
```
|
||||||
characters:
|
|
||||||
| OS | Separator | Example |
|
## Meta
|
||||||
| ------------------- | --------- | ----------------------- |
|
|
||||||
| Linux / macOS / BSD | `:` | `$HOME:$HOME/private/*` |
|
- Author: Daniel Miessler
|
||||||
| Windows | `;` | `$HOME;$HOME/private/*` |
|
- Published: January 5, 2024
|
||||||
- By default, this is set to `"$HOME"`.
|
|
||||||
- `_ZO_FZF_OPTS`
|
Read more about the matching algorithm [here][algorithm-matching].
|
||||||
- Custom options to pass to [fzf] during interactive selection. See
|
|
||||||
[`man fzf`][fzf-man] for the list of options.
|
|
||||||
- `_ZO_MAXAGE`
|
|
||||||
- Configures the [aging algorithm][algorithm-aging], which limits the maximum
|
|
||||||
number of entries in the database.
|
|
||||||
- By default, this is set to 10000.
|
|
||||||
- `_ZO_RESOLVE_SYMLINKS`
|
|
||||||
- When set to 1, `z` will resolve symlinks before adding directories to the
|
|
||||||
database.
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user