Fix Elvish install instructions
This commit is contained in:
parent
b8bb6f0f85
commit
d39c9a1fc6
|
|
@ -3,9 +3,10 @@
|
||||||
> A smarter cd command for your terminal
|
> 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
|
`zoxide` is a blazing fast replacement for your `cd` command, inspired by
|
||||||
[`z`][z] and [`z.lua`][z.lua]. It keeps track of the directories you use most
|
`z` and `z.lua`. It keeps track of the directories you use most
|
||||||
frequently, and uses a ranking algorithm to navigate to the best match.
|
frequently, and uses a ranking algorithm to navigate to the best match.
|
||||||
|
|
||||||
![Tutorial][tutorial]
|
![Tutorial][tutorial]
|
||||||
|
|
@ -115,7 +116,7 @@ eval "$(zoxide init bash)"
|
||||||
Add this to your configuration (usually `~/.elvish/rc.elv`):
|
Add this to your configuration (usually `~/.elvish/rc.elv`):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
eval $(zoxide init elvish | slurp)
|
eval (zoxide init elvish | slurp)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `fish`
|
#### `fish`
|
||||||
|
|
@ -260,6 +261,7 @@ Be sure to set these before calling `zoxide init`.
|
||||||
[nnn]: https://github.com/jarun/nnn
|
[nnn]: https://github.com/jarun/nnn
|
||||||
[pkgsrc]: https://pkgsrc.se/sysutils/zoxide
|
[pkgsrc]: https://pkgsrc.se/sysutils/zoxide
|
||||||
[releases]: https://github.com/ajeetdsouza/zoxide/releases
|
[releases]: https://github.com/ajeetdsouza/zoxide/releases
|
||||||
|
[releases-badge]: https://img.shields.io/github/v/release/ajeetdsouza/zoxide
|
||||||
[scoop]: https://github.com/ScoopInstaller/Main/tree/master/bucket/zoxide.json
|
[scoop]: https://github.com/ScoopInstaller/Main/tree/master/bucket/zoxide.json
|
||||||
[telescope-zoxide]: https://github.com/jvgrootveld/telescope-zoxide
|
[telescope-zoxide]: https://github.com/jvgrootveld/telescope-zoxide
|
||||||
[termux]: https://github.com/termux/termux-packages/tree/master/packages/zoxide
|
[termux]: https://github.com/termux/termux-packages/tree/master/packages/zoxide
|
||||||
|
|
@ -268,7 +270,5 @@ Be sure to set these before calling `zoxide init`.
|
||||||
[void linux packages]: https://github.com/void-linux/void-packages/tree/master/srcpkgs/zoxide
|
[void linux packages]: https://github.com/void-linux/void-packages/tree/master/srcpkgs/zoxide
|
||||||
[xxh-plugin-prerun-zoxide]: https://github.com/xxh/xxh-plugin-prerun-zoxide
|
[xxh-plugin-prerun-zoxide]: https://github.com/xxh/xxh-plugin-prerun-zoxide
|
||||||
[xxh]: https://github.com/xxh/xxh
|
[xxh]: https://github.com/xxh/xxh
|
||||||
[z.lua]: https://github.com/skywind3000/z.lua
|
|
||||||
[z]: https://github.com/rupa/z
|
|
||||||
[zoxide.vim]: https://github.com/nanotee/zoxide.vim
|
[zoxide.vim]: https://github.com/nanotee/zoxide.vim
|
||||||
[zsh-autocomplete]: https://github.com/marlonrichert/zsh-autocomplete
|
[zsh-autocomplete]: https://github.com/marlonrichert/zsh-autocomplete
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ If you'd like to prevent a directory from being added to the database, see the
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.TP
|
.TP
|
||||||
.B -h, --help
|
.B -h, --help
|
||||||
Prints help information.
|
Print help information.
|
||||||
.SH REPORTING BUGS
|
.SH REPORTING BUGS
|
||||||
For any issues, feature requests, or questions, please visit:
|
For any issues, feature requests, or questions, please visit:
|
||||||
.sp
|
.sp
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ l l.
|
||||||
algorithm is too different to import the scores.
|
algorithm is too different to import the scores.
|
||||||
.TP
|
.TP
|
||||||
.B -h, --help
|
.B -h, --help
|
||||||
Prints help information.
|
Print help information.
|
||||||
.TP
|
.TP
|
||||||
.B --merge
|
.B --merge
|
||||||
By default, the import fails if the current database is not already empty. This
|
By default, the import fails if the current database is not already empty. This
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ Changes the prefix of predefined aliases (\fBz\fR, \fBzi\fR).
|
||||||
e.g. --cmd j would change the aliases to j and ji respectively.
|
e.g. --cmd j would change the aliases to j and ji respectively.
|
||||||
.TP
|
.TP
|
||||||
.B -h, --help
|
.B -h, --help
|
||||||
Prints help information.
|
Print help information.
|
||||||
.TP
|
.TP
|
||||||
.B --hook \fIHOOK\fR
|
.B --hook \fIHOOK\fR
|
||||||
Changes how often zoxide increments a directory's score:
|
Changes how often zoxide increments a directory's score:
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ zoxide-query - search for a directory in the database
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B zoxide query \fI[KEYWORDS] [OPTIONS]\fR
|
.B zoxide query \fI[KEYWORDS] [OPTIONS]\fR
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Queries the database for paths matching the keywords. The exact \fBMATCHING\fR
|
Query the database for paths matching the keywords. The exact \fBMATCHING\fR
|
||||||
algorithm is described in \fBzoxide\fR(1).
|
algorithm is described in \fBzoxide\fR(1).
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.TP
|
.TP
|
||||||
|
|
@ -12,7 +12,7 @@ algorithm is described in \fBzoxide\fR(1).
|
||||||
Show deleted directories.
|
Show deleted directories.
|
||||||
.TP
|
.TP
|
||||||
.B -h, --help
|
.B -h, --help
|
||||||
Prints help information.
|
Print help information.
|
||||||
.TP
|
.TP
|
||||||
.B -i, --interactive
|
.B -i, --interactive
|
||||||
Use interactive selection. This option requires fzf.
|
Use interactive selection. This option requires fzf.
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ If you'd like to permanently exclude a directory from the database, see the
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.TP
|
.TP
|
||||||
.B -h, --help
|
.B -h, --help
|
||||||
Prints help information.
|
Print help information.
|
||||||
.TP
|
.TP
|
||||||
.B -i, --interactive \fI[KEYWORDS]\fR
|
.B -i, --interactive \fI[KEYWORDS]\fR
|
||||||
Use interactive selection. This option requires fzf.
|
Use interactive selection. This option requires fzf.
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,10 @@ Remove a directory from the database.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.TP
|
.TP
|
||||||
.B -h, --help
|
.B -h, --help
|
||||||
Prints help information.
|
Print help information.
|
||||||
.TP
|
.TP
|
||||||
.B -V, --version
|
.B -V, --version
|
||||||
Prints version information
|
Print version information.
|
||||||
.SH ENVIRONMENT VARIABLES
|
.SH ENVIRONMENT VARIABLES
|
||||||
Environment variables must be set before calling \fBzoxide init\fR.
|
Environment variables must be set before calling \fBzoxide init\fR.
|
||||||
.TP
|
.TP
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ use crate::util;
|
||||||
|
|
||||||
use anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
|
|
||||||
use std::io::{self, BufWriter, Write};
|
use std::io::{self, Write};
|
||||||
|
|
||||||
impl Run for Query {
|
impl Run for Query {
|
||||||
fn run(&self) -> Result<()> {
|
fn run(&self) -> Result<()> {
|
||||||
|
|
@ -39,13 +39,8 @@ impl Run for Query {
|
||||||
print!("{}", path)
|
print!("{}", path)
|
||||||
}
|
}
|
||||||
} else if self.list {
|
} else if self.list {
|
||||||
// Rust does line-buffering by default, i.e. it flushes stdout
|
|
||||||
// after every newline. This is not ideal when printing a large
|
|
||||||
// number of lines, so we put stdout in a BufWriter.
|
|
||||||
let stdout = io::stdout();
|
let stdout = io::stdout();
|
||||||
let stdout = stdout.lock();
|
let handle = &mut stdout.lock();
|
||||||
let mut handle = BufWriter::new(stdout);
|
|
||||||
|
|
||||||
while let Some(dir) = stream.next() {
|
while let Some(dir) = stream.next() {
|
||||||
if self.score {
|
if self.score {
|
||||||
writeln!(handle, "{}", dir.display_score(now))
|
writeln!(handle, "{}", dir.display_score(now))
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,6 @@ impl<'db, 'file> Stream<'db, 'file> {
|
||||||
}
|
}
|
||||||
|
|
||||||
let resolver = if self.resolve_symlinks { fs::symlink_metadata } else { fs::metadata };
|
let resolver = if self.resolve_symlinks { fs::symlink_metadata } else { fs::metadata };
|
||||||
|
|
||||||
resolver(path.as_ref()).map(|m| m.is_dir()).unwrap_or_default()
|
resolver(path.as_ref()).map(|m| m.is_dir()).unwrap_or_default()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,4 +83,4 @@ edit:add-var zi~ $__zoxide_zi~
|
||||||
# To initialize zoxide, add this to your configuration (usually
|
# To initialize zoxide, add this to your configuration (usually
|
||||||
# ~/.elvish/rc.elv):
|
# ~/.elvish/rc.elv):
|
||||||
#
|
#
|
||||||
# eval $(zoxide init elvish | slurp)
|
# eval (zoxide init elvish | slurp)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue