diff --git a/README.md b/README.md index 344c9fd..a89915d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ > A smarter cd command for your terminal -[![crates.io][crates-io-badge]][crates-io] +[![crates.io][crates-io-badge]][crates.io] [![Releases][releases-badge]][releases] `zoxide` is a blazing fast replacement for your `cd` command, inspired by @@ -49,7 +49,7 @@ Alternatively, you can use a package manager: | Distribution | Repository | Instructions | | ------------------ | ----------------------- | ---------------------------------------------------------------------------------------------- | -| ***Any*** | **[crates-io]** | `cargo install zoxide` | +| ***Any*** | **[crates.io]** | `cargo install zoxide` | | *Any* | [conda-forge] | `conda install -c conda-forge zoxide` | | *Any* | [Linuxbrew] | `brew install zoxide` | | Alpine Linux 3.13+ | [Alpine Linux Packages] | `apk add zoxide` | @@ -73,7 +73,7 @@ To install `zoxide`, use a package manager: | Repository | Instructions | | --------------- | ------------------------------------- | -| **[crates-io]** | `cargo install zoxide` | +| **[crates.io]** | `cargo install zoxide` | | [conda-forge] | `conda install -c conda-forge zoxide` | | [Homebrew] | `brew install zoxide` | | [MacPorts] | `port install zoxide` | @@ -93,7 +93,7 @@ Alternatively, you can use a package manager: | Repository | Instructions | | --------------- | ------------------------------------- | -| **[crates-io]** | `cargo install zoxide` | +| **[crates.io]** | `cargo install zoxide` | | [Chocolatey] | `choco install zoxide` | | [conda-forge] | `conda install -c conda-forge zoxide` | | [Scoop] | `scoop install zoxide` | @@ -107,7 +107,7 @@ To install `zoxide`, use a package manager: | Distribution | Repository | Instructions | | ------------- | --------------- | ---------------------- | -| ***Any*** | **[crates-io]** | `cargo install zoxide` | +| ***Any*** | **[crates.io]** | `cargo install zoxide` | | DragonFly BSD | [DPorts] | `pkg install zoxide` | | FreeBSD | [FreshPorts] | `pkg install zoxide` | | NetBSD | [pkgsrc] | `pkgin install zoxide` | @@ -125,35 +125,7 @@ To install `zoxide`, use a package manager: -### *Step 2: Install `fzf` (optional)* - -[`fzf`][fzf] is a command-line fuzzy finder, used by `zoxide` for interactive -selection. It can be installed from [here][fzf-installation]. - -### *Step 3: Import your data (optional)* - -If you currently use any of the following utilities, you may want to import -your data into `zoxide`: - -
-autojump - -```sh -zoxide import --from autojump path/to/db -``` - -
- -
-z, z.lua, or zsh-z - -```sh -zoxide import --from z path/to/db -``` - -
- -### *Step 4: Add `zoxide` to your shell* +### *Step 2: Add `zoxide` to your shell* To start using `zoxide`, add it to your shell. @@ -199,7 +171,7 @@ Initialize the `zoxide` script: zoxide init nushell --hook prompt | save ~/.zoxide.nu ``` -Add this to your configuration (usually `~/.config/nu/config.toml`): +Add this to your configuration (find it by running `config path` in Nushell): ```toml prompt = "__zoxide_hook;__zoxide_prompt" @@ -213,7 +185,8 @@ You can replace `__zoxide_prompt` with a custom prompt.
powershell -Add this to your configuration (find it with `echo $profile`): +Add this to your configuration (find it by running `echo $profile` in +PowerShell): ```powershell Invoke-Expression (& { @@ -257,6 +230,34 @@ eval "$(zoxide init posix --hook prompt)"
+### *Step 3: Install `fzf` (optional)* + +[`fzf`][fzf] is a command-line fuzzy finder, used by `zoxide` for interactive +selection. It can be installed from [here][fzf-installation]. + +### *Step 4: Import your data (optional)* + +If you currently use any of the following utilities, you may want to import +your data into `zoxide`: + +
+autojump + +```sh +zoxide import --from autojump path/to/db +``` + +
+ +
+z, z.lua, or zsh-z + +```sh +zoxide import --from z path/to/db +``` + +
+ ## Configuration ### Flags @@ -338,7 +339,7 @@ Be sure to set these before calling `zoxide init`. [conda-forge]: https://anaconda.org/conda-forge/zoxide [copr]: https://copr.fedorainfracloud.org/coprs/atim/zoxide/ [crates-io-badge]: https://img.shields.io/crates/v/zoxide -[crates-io]: https://crates.io/crates/zoxide +[crates.io]: https://crates.io/crates/zoxide [debian packages]: https://packages.debian.org/testing/admin/zoxide [devuan packages]: https://pkginfo.devuan.org/cgi-bin/package-query.html?c=package&q=zoxide [dports]: https://github.com/DragonFlyBSD/DPorts/tree/master/sysutils/zoxide diff --git a/man/zoxide-init.1 b/man/zoxide-init.1 index 3efffbf..3ebc643 100644 --- a/man/zoxide-init.1 +++ b/man/zoxide-init.1 @@ -34,7 +34,8 @@ Create a Nushell script: \fBzoxide init nushell --hook prompt | save ~/.zoxide.nu\fR .fi .sp -Add this to your configuration (usually \fI~/.config/nu/config.toml\fR): +Add this to your configuration (find it by running \fBconfig path\fR in +Nushell): .sp .nf \fBprompt = "__zoxide_hook;__zoxide_prompt"\fR diff --git a/templates/nushell.txt b/templates/nushell.txt index a50f920..7bfc199 100644 --- a/templates/nushell.txt +++ b/templates/nushell.txt @@ -1,6 +1,8 @@ {%- let section = "# =============================================================================\n#" -%} {%- let not_configured = "# -- not configured --" -%} +# Code generated by zoxide. DO NOT EDIT. + {{ section }} # Utility functions for zoxide. # @@ -97,7 +99,7 @@ alias {{cmd}}i = __zoxide_zi # # zoxide init nushell --hook prompt | save ~/.zoxide.nu # -# Add this to your configuration (usually ~/.config/nu/config.toml): +# Add this to your configuration (find it by running `config path` in Nushell): # # prompt = '__zoxide_hook;__zoxide_prompt' # startup = ['zoxide init nushell --hook prompt | save ~/.zoxide.nu', 'source ~/.zoxide.nu'] diff --git a/templates/powershell.txt b/templates/powershell.txt index 2d30a40..d4d77ab 100644 --- a/templates/powershell.txt +++ b/templates/powershell.txt @@ -115,7 +115,7 @@ Set-Alias {{cmd}}i __zoxide_zi {%- endmatch %} {{ section }} -# To initialize zoxide, add this to your configuration (find it with -# `echo $profile`): +# To initialize zoxide, add this to your configuration (find it by running +# `echo $profile` in PowerShell): # # Invoke-Expression (& { $hook = if ($PSVersionTable.PSVersion.Major -ge 6) { 'pwd' } else { 'prompt' } (zoxide init powershell --hook $hook) -join "`n" })