Git Product home page Git Product logo

zoxide's Introduction

Special thanks to:

Warp
Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
Visit warp.dev to learn more.

zoxide

crates.io Downloads Built with Nix

zoxide is a smarter cd command, inspired by z and autojump.

It remembers which directories you use most frequently, so you can "jump" to them in just a few keystrokes.
zoxide works on all major shells.

Getting startedInstallationConfigurationIntegrations

Getting started

Tutorial

z foo              # cd into highest ranked directory matching foo
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.

Installation

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.

    Linux / WSL

    The recommended way to install zoxide is via the install script:

    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
    asdf install zoxide latest
    Any conda-forge conda install -c conda-forge zoxide
    Any guix guix install 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
    dnf install zoxide
    Debian 11+1 Debian Packages apt install zoxide
    Devuan 4.0+ Devuan Packages apt install zoxide
    Exherbo Linux Exherbo packages cave resolve -x repository/rust
    cave resolve -x zoxide
    Fedora 32+ Fedora Packages dnf install zoxide
    Gentoo Gentoo Packages emerge app-shells/zoxide
    Manjaro pacman -S zoxide
    openSUSE Tumbleweed openSUSE Factory zypper install zoxide
    Parrot OS1 apt install zoxide
    Raspbian 11+1 Raspbian Packages apt install zoxide
    Rhino Linux Pacstall Packages pacstall -I zoxide-deb
    Slackware 15.0+ SlackBuilds Instructions
    Solus Solus Packages eopkg install zoxide
    Ubuntu 21.04+1 Ubuntu Packages apt install zoxide
    Void Linux Void Linux Packages xbps-install -S zoxide
    macOS

    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
    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:

    curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash
    Windows

    zoxide works with PowerShell, as well as shells running in Cygwin, Git Bash, and MSYS2.

    The recommended way to install zoxide is via winget:

    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
    BSD

    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

    Or, run this command in your terminal:

    curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash
    Android

    To install zoxide, use a package manager:

    Repository Instructions
    Termux pkg install zoxide
  2. Setup zoxide on your shell

    To start using zoxide, add it to your shell.

    Bash

    Add this to the end of your config file (usually ~/.bashrc):

    eval "$(zoxide init bash)"
    Elvish

    Add this to the end of your config file (usually ~/.elvish/rc.elv):

    eval (zoxide init elvish | slurp)

    Note zoxide only supports elvish v0.18.0 and above.

    Fish

    Add this to the end of your config file (usually ~/.config/fish/config.fish):

    zoxide init fish | source
    Nushell

    Add this to the end of your env file (find it by running $nu.env-path in Nushell):

    zoxide init nushell | save -f ~/.zoxide.nu

    Now, add this to the end of your config file (find it by running $nu.config-path in Nushell):

    source ~/.zoxide.nu

    Note zoxide only supports Nushell v0.89.0+.

    PowerShell

    Add this to the end of your config file (find it by running echo $profile in PowerShell):

    Invoke-Expression (& { (zoxide init powershell | Out-String) })
    Xonsh

    Add this to the end of your config file (usually ~/.xonshrc):

    execx($(zoxide init xonsh), 'exec', __xonsh__.ctx, filename='zoxide')
    Zsh

    Add this to the end of your config file (usually ~/.zshrc):

    eval "$(zoxide init zsh)"

    For completions to work, the above line must be added after compinit is called. You may have to rebuild your completions cache by running rm ~/.zcompdump*; compinit.

    Any POSIX shell

    Add this to the end of your config file:

    eval "$(zoxide init posix --hook prompt)"
  3. Install fzf (optional)

    fzf is a command-line fuzzy finder, used by zoxide for completions / interactive selection. It can be installed from here.

    Note zoxide only supports fzf v0.33.0 and above.

  4. Import your data (optional)

    If you currently use any of these plugins, you may want to import your data into zoxide:

    autojump

    Run this command in your terminal:

    zoxide import --from=autojump "/path/to/autojump/db"

    The path usually varies according to your system:

    OS Path Example
    Linux $XDG_DATA_HOME/autojump/autojump.txt or $HOME/.local/share/autojump/autojump.txt /home/alice/.local/share/autojump/autojump.txt
    macOS $HOME/Library/autojump/autojump.txt /Users/Alice/Library/autojump/autojump.txt
    Windows %APPDATA%\autojump\autojump.txt C:\Users\Alice\AppData\Roaming\autojump\autojump.txt
    fasd, z, z.lua, zsh-z

    Run this command in your terminal:

    zoxide import --from=z "path/to/z/db"

    The path usually varies according to your system:

    Plugin Path
    fasd $_FASD_DATA or $HOME/.fasd
    z (bash/zsh) $_Z_DATA or $HOME/.z
    z (fish) $Z_DATA or $XDG_DATA_HOME/z/data or $HOME/.local/share/z/data
    z.lua (bash/zsh) $_ZL_DATA or $HOME/.zlua
    z.lua (fish) $XDG_DATA_HOME/zlua/zlua.txt or $HOME/.local/share/zlua/zlua.txt or $_ZL_DATA
    zsh-z $ZSHZ_DATA or $_Z_DATA or $HOME/.z
    ZLocation

    Run this command in PowerShell:

    $db = New-TemporaryFile
    (Get-ZLocation).GetEnumerator() | ForEach-Object { Write-Output ($_.Name+'|'+$_.Value+'|0') } | Out-File $db
    zoxide import --from=z $db

Configuration

Flags

When calling zoxide init, the following flags are available:

  • --cmd
    • Changes the prefix of the z and zi commands.
    • --cmd j would change the commands to (j, ji).
    • --cmd cd would replace the cd command.
  • --hook <HOOK>
    • Changes how often zoxide increments a directory's score:
      Hook Description
      none Never
      prompt At every shell prompt
      pwd Whenever the directory is changed
  • --no-cmd
    • Prevents zoxide from defining the z and zi commands.
    • These functions will still be available in your shell as __zoxide_z and __zoxide_zi, should you choose to redefine them.

Environment variables

Environment variables2 can be used for configuration. They must be set before zoxide init is called.

  • _ZO_DATA_DIR
    • Specifies the directory in which the database is stored.
    • The default value varies across OSes:
      OS Path Example
      Linux / BSD $XDG_DATA_HOME or $HOME/.local/share /home/alice/.local/share
      macOS $HOME/Library/Application Support /Users/Alice/Library/Application Support
      Windows %LOCALAPPDATA% C:\Users\Alice\AppData\Local
  • _ZO_ECHO
    • When set to 1, z will print the matched directory before navigating to it.
  • _ZO_EXCLUDE_DIRS
    • Excludes the specified directories from the database.
    • This is provided as a list of globs, separated by OS-specific characters:
      OS Separator Example
      Linux / macOS / BSD : $HOME:$HOME/private/*
      Windows ; $HOME;$HOME/private/*
    • By default, this is set to "$HOME".
  • _ZO_FZF_OPTS
    • Custom options to pass to fzf during interactive selection. See man fzf for the list of options.
  • _ZO_MAXAGE
    • Configures the aging algorithm, 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.

Third-party integrations

Application Description Plugin
aerc Email client Natively supported
clink Improved cmd.exe for Windows clink-zoxide
emacs Text editor zoxide.el
felix File manager Natively supported
joshuto File manager Natively supported
lf File manager See the wiki
nnn File manager nnn-autojump
ranger File manager ranger-zoxide
telescope.nvim Fuzzy finder for Neovim telescope-zoxide
t tmux session manager Natively supported
tmux-session-wizard tmux session manager Natively supported
vim / neovim Text editor zoxide.vim
xplr File manager zoxide.xplr
xxh Transports shell configuration over SSH xxh-plugin-prerun-zoxide
yazi File manager Natively supported
zabb Finds the shortest possible query for a path Natively supported
zsh-autocomplete Realtime completions for zsh Natively supported

Footnotes

  1. Debian / Ubuntu derivatives update their packages very slowly. If you're using one of these distributions, consider using the install script instead. 2 3 4

  2. If you're not sure how to set an environment variable on your shell, check out the wiki.

zoxide's People

Contributors

aaronkollasch avatar aisamu avatar ajeetdsouza avatar alin23 avatar boomker avatar c02y avatar cherryblossom000 avatar cole-h avatar crazystylus avatar cust0dian avatar daizeng1984 avatar dependabot[bot] avatar ditsuke avatar edjopato avatar goodsyntax808 avatar grimm26 avatar kidonng avatar lzybkr avatar nextalone avatar rif avatar rtzoeller avatar sitiom avatar skorokithakis avatar spencerwooo avatar step-security-bot avatar tekumara avatar tommoulard avatar xylyxyrr avatar z572 avatar zuruuh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zoxide's Issues

Windows installation via WinGet

Anything planned for Windows? Preferably: installation via WinGet/Scoop, publishing Windows binaries alongside Linux/macOS on GitHub release, etc.

panic in tmux

CMD

tmux new-session -t a \; new-window

Error mesg

could not move temporary database file: No such file or directory (os error 2)

Error when cd-ing into any directory in fish shell

Hello, I installed zoxide according to the instructions in the README file. I also initialized it for fish shell.

Now, when I cd into any directory, I get this error:

error: Found argument '--add' which wasn't expected, or isn't valid in this context

USAGE:
    zoxide query [FLAGS] [keywords]...

For more information try --help
zoxide --version
zoxide 0.2.1

fish --version
fish, version 3.0.2

Any help with this?

POSIX sh support

Would be nice to have POSIX sh support instead of just Bash. Would allow people to use zoxide on a wide variety of shells.

The Bash init script doesn't seem too far from being POSIX.

Exclude certain directories from the database

Something that z.lua, z.sh, and z (fish) all have is a way to exclude/blacklist specific directories from the database. This would be useful to ensure that my home directory doesn't have an enormous rank (due to it being where my shell starts up initially), as well as hiding potentially sensitive/hidden/otherwise secret directories that should not be recorded.

Every time I open up zi and see my home directory, I am reminded of this, so I wanted to submit a formal (tracking) issue for it.

[Idea] replace fzf support with skim library

The skim binary is as far as I could tell a direct drop-in replacement for fzf built with rust. I have never used their library but their example on their README

# Cargo.toml
[dependencies]
skim = "0.7.0"
extern crate skim;
use skim::prelude::*;
use std::io::Cursor;

pub fn main() {
    let options = SkimOptionsBuilder::default()
        .height(Some("50%"))
        .multi(true)
        .build()
        .unwrap();

    let input = "aaaaa\nbbbb\nccc".to_string();

    // `SkimItemReader` is a helper to turn any `BufRead` into a stream of `SkimItem`
    // `SkimItem` was implemented for `AsRef<str>` by default
    let item_reader = SkimItemReader::default();
    let items = item_reader.of_bufread(Cursor::new(input));

    // `run_with` would read and show items from the stream
    let selected_items = Skim::run_with(&options, Some(items))
        .map(|out| out.selected_items)
        .unwrap_or_else(|| Vec::new());

    for item in selected_items.iter() {
        print!("{}: {}{}", item.get_index(), item.get_output_text(), "\n");
    }
}

seems simple enough.

Holding enter boosts directory's rank

At the moment, this is intended behavior (and also the behavior of most other jumpers).

I am of the opinion that we should have some way to allow the user to decide if they want to add a directory on every prompt redraw, or on every PWD change (see the "Prior art" section below for how our predecessors do this). Although a departure from what the other jumpers have named theirs, maybe introducing $_ZO_WATCH_PWD to choose whether or not a directory is added on each prompt redraw, or every time PWD is changed, is the solution here.

I also believe that any more complicated setup should be up to the user.

To be clear: this issue is supposed to be one for discussing what action should be taken here.


Prior art

z (original) has the $_Z_NO_PROMPT_COMMAND env var to allow the user to disable this functionality (or handle it themselves).

z.lua has $_ZL_ADD_ONCE (and an --init once flag) which controls this.

z (fish edition) only adds when PWD changes, and has no option to modify this behavior.


cc @ajeetdsouza

Could not deserialize database

Hello,

i have an error that i do not know to resolve. I guess it can be an error about the storage, maybe i should remove the file ?

あ→ z
Error: could not deserialize database

Caused by:
    io error: failed to fill whole buffer

Some information

あ→ uname -a
Linux DESK-HOME 5.5.9-arch1-2 #1 SMP PREEMPT Thu, 12 Mar 2020 23:01:33 +0000 x86_64 GNU/Linux

Zoxide query: "query: " prefix in result hinders composability in shell commands

I request that zoxide query simply result the path without a query: prefix.

That way you can use the result immediately as argument to other commands.

My primary interest is that I want to easily open VSCode on various codebases. Currently it's easiest if I run z <keyword>; code . in a new terminal and then close it again, but it would be easier if I could instead just do code $(zq <keyword>). As this doesn't modify the current directory of the terminal, I could execute this from any of the terminals I already have open.

error: The following required arguments were not provided

Bash version: bash 5.0.17
Zoxide version: zoxide v0.4.1-unknown

I use Manjaro and installed zoxide from AUR. I have added eval "$(zoxide init bash)" to my .bashrc file sourced it and also rebooted but zoxide init still can't recognize my shell.

Picture from the error:
Image

Error: could not launch fzf

I am running this on windows 10 cygwin. I built zoxide with windows cargo and I do have /usr/bin/fzf which works fine.

Error: could not launch fzf

Caused by:
The system cannot find the file specified. (os error 2)

Conflict with Starship

Steps to reproduce

  • Install zoxide: cargo install zoxide -f
  • Add the hook to $PROFILE
  • Restart terminal
  • Go to some dir with zoxide: z some_dir
  • Check zoxide dir: ls C:\Users\UserName\AppData\Local\zoxide (Error! No such directory!)
  • Try to match with zoxide: z some (Error! No matches!)
  • Check zoxide dir again: ls C:\Users\UserName\AppData\Local\zoxide (Ok! Now it exists but there is still no db file)

Additional info

I am running the default powershell available on windows ($PSVersionTable.PSVersion.Major yields 5, thus the hook defaults to 'prompt' according to the README powershell snippet)

zoxide v0.3 - breaking changes

I'm planning to introduce some breaking changes to the way zoxide works in the next release. I will put my ideas into the comments below so they can be addressed separately. The idea is that we should do this as little as possible, so we should club the changes to ensure that users are least inconvenienced.

Brew / AUR packages

I'd love to see this tool as brew package as well as on the arch user repository.

Zoxide stores the symlink targets

Hi,
Giving this example, with one symlink to another directory:

$ ls ~/tmp
  foo -> foo-target
  foo-target

If I cd into ~/tmp/foo, zoxide will follow the symlink and stores this target (foo-target) in its database. So if I do:

$ zq foo
/home/anthony/tmp/foo-target

Which is a bit non-intuitive for me. Do you see a possibility of adding an option to ignore symlinks, and consider them as normal folders?

[Fish Shell] Could not deserialize old database error

I'm using Fish for my shell and all of a sudden I started getting this error:

Error: could not deserialize old database

Caused by:
    io error: failed to fill whole buffer

Any idea why this might've started happening? I really loved zoxide btw so great work! Hopefully I can fix this because it's been getting annoying

[Question] Can't get it working - error: Found argument 'init' which wasn't expected, or isn't valid in this context

Not sure what I'm missing but I can't get zoxide working.

  • OS: Arch Linux
  • shell: zsh 5.8-1

What I did:

  1. Installed zoxideAUR
  2. Added eval "$(zoxide init zsh)" to my ~/.zshrc

When opening a terminal, I get:

error: Found argument 'init' which wasn't expected, or isn't valid in this context

USAGE:
    zoxide [SUBCOMMAND]

For more information try --help
~ ➜ z ~/Documents
zsh: command not found: z
~ ➜ 

Note that I'm also using zinit plugin manager.

What could be the issue? Thanks in advance for any help.

list best entries and fzf tweaks

Hi,

It would be awesome to have the same ability as z.lua to list entries with/without scores, equivalent of z -l and z -l -s.

I was using these to have my own equivalent of
zi foo # cd with interactive selection using fzf

since zoxide is taking care of it, I have some suggestions on this.

Practically, I never look/worry about scores, it would be great to be able to list entries with fzf without scores.

One nitpick also is to automatically cd to the directory if there is only one match which is not the case currently.

Thanks !

Last line of help option is not a newline

my env

OS macOS v 10.16.6 (Mojave)
shell bash v 5.0.11

issue

The output for z or zi is:

~$ z -h
zoxide-query 0.2.0
Search for a directory

USAGE:
    zoxide query [FLAGS] [keywords]...

FLAGS:
    -h, --help           Prints help information
    -i, --interactive    Opens an interactive selection menu using fzf
    -V, --version        Prints version information

ARGS:
    <keywords>...    ~$ 

What I expect is the output below

~$ z -h
zoxide-query 0.2.0
Search for a directory

USAGE:
    zoxide query [FLAGS] [keywords]...

FLAGS:
    -h, --help           Prints help information
    -i, --interactive    Opens an interactive selection menu using fzf
    -V, --version        Prints version information

ARGS:
    <keywords>...    
~$ 

Print full path of the directory jumped to

Would you consider having an option like _ZO_VERBOSE that would print the full path of the directory that z picked?

$ z tr
/home/np/rustuff/track

Feel free to close this issue if it has already been implemented, I am not the most attentive of readers ;)

Why not join force with pazi?

I guess you must have different approaches but maybe it could help if both projects would work together.

But maybe those autojumper tools are simple enough that it's not like they need thousands and thousands of work hours on them and just need to be maintained after a while.

Add an init subcommand

Would be great to have an init method. This would allow us to source $(eval zoxide init zsh) and stay up to date if you make a script change in the future.

Add zsh completion

It would be awesome to tab complete the top rated entries.

Side note: All the tickets are because your tool is awesome :) 🥇

fuzzy match for typoes

Hi, I'm coming from using autojump after being recommended this from a coworker. I love the blazing speed of zoxide.

Below are some examples for fuzzy matching.

Screen Shot 2020-03-14 at 15 43 13

( Note: you can see the echo that's mentioned in #22 )

I also miss jo (open matching directory. for mac this is something like open (zoxide query $argv) )

Print database path in errors

I had zoxide 0.1.1 installed and encountered the database corruption issue described in #68.
I installed the new version and received the following error message:

Error: could not deserialize old database

Caused by:
    io error: failed to fill whole buffer

I think zoxide should document the default database locations and also print the database file path when it can't be read.

Have to compile from source when install with linuxbrew

I installed zoxide with brew install ajeetdsouza/zoxide/zoxide

The binary has to be compiled from source when I install with linuxbrew. Is that a bug? I think it should download the precompiled binary in the github release page.

Jumping to directories results in error status in fish shell

The recent _ZO_ECHO changes made fish shell return an error status after jumping to any directory (see the below screenshot). This doesn't affect functionality, but is certainly annoying and wrong behavior, considering it didn't behave like this before.

image

(I've verified the issue is unrelated to direnv, to assuage any concerns)

Bisected to:

f4cd1159c5419ece11b1d0147c23dba1c7579edc is the first bad commit
commit f4cd1159c5419ece11b1d0147c23dba1c7579edc
Author: Ajeet D'Souza <[email protected]>
Date:   Sun Mar 15 17:44:23 2020 +0530

    Add $_ZO_ECHO to echo match before navigating

 src/subcommand/init.rs | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

Disclaimer: this may be present in other shells, but I only use fish.

Proposal: switch to TOML config files instead of using environment variables

Advantages:

  • Richer data structures allow us to represent things like lists (eg. #48, #60) in a more user-friendly manner. Being a specialized format, it also reduces the change of parsing errors (see #48 - what if a directory had a : in the name?).
  • It is less prone to human error, since an misspelled/deprecated variable in the config file will throw an error/warning immediately.
  • Config files, IMHO, tend to be a lot more manageable than environment variables, and can be backed up along with the rest of one's dotfiles. An additional advantage here is that one can use the same config file across shells.

@cole-h presented some interesting insight into the issue, and I'll add my comments here:

Want to test something? _ZO_DATA_DIR=/tmp/zo zoxide add /tmp. Want to change the max age for a single shell session? export _ZO_MAXAGE=9999 (or however you achieve that in any arbitrary shell).

I think this is a fairly limited use case, and isn't likely to affect most people. For the people that need it, they can keep an editor open with a temporary config file and change it as desired.

If we ship a default configuration file, we then have to make sure users know when new options are added, or options are deleted/deprecated. If we don't ship a default configuration, we have to make sure users know how to create their own.

We will ensure that zoxide works out of the box with zero configuration. The only use of the config file is for those users that would like to change the default behaviour.

It also becomes another folder related to zoxide on users' filesystems: their local data dir for the database itself, and now the config dir for the configuration file.

This is true, but since the user never has to deal with the data directory, it mostly just becomes an issue of managing the one config file (versus managing environment variables in one's shell rc file).

The file format itself also brings with it a whole host of issues, see: the many different "bugs" filed on Alacritty's issue tracker about configuration -- improper indentation, duplicate keys, unused keys, etc., in their case of YAML.

Looks like they're seriously considering shifting to TOML too, since YAML is too error-prone as a file format. They do mention that TOML would solve most issues, though.

Another disadvantage I can think of is that this will likely result in a slight slowdown, since we have to read another file, and, unlike environment variables, we can't selectively parse only the values that we need. That said, this shouldn't be a very significant slowdown, and I think we should favour usability over speed.

Import the entries from .z

I started using zoxide and am very impressed by its speed compared to other utilities. Am currently using zsh-z. It would be nice if there was a way to import the entries from the earlier $HOME/.z to zoxide database. Any plans on using the existing data?

Request: Custom command instead of 'z'

I'd like to try this as a replacement for zsh-z, but use z for something else and don't want to have to do a dance of redefining. I currently init zsh-z with:

ZSHZ_CMD=j ZSHZ_NO_RESOLVE_SYMLINKS=1 . ~/Code/zsh-z/zsh-z.plugin.zsh

And am looking for something similar to that or like:

eval "$(zoxide init --no-define-aliases --cmd j zsh)"

Installation fails on fish

Trying to install with fisher, I get:

added 7 packages, removed 6 packages in 1.37s
zoxide: command not found
init.fish (line 2): 
    zoxide add
    ^
in function 'zoxide-add'
in event handler: handler for generic event “fish_prompt”

(eval):10: parse error near `()'

Install went well:

⚡️ 14% at 🕙 22:52:00 🚀 ᐅ curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/ajeetdsouza/zoxide/master/install.sh | sh
Detected target: x86_64-apple-darwin
Downloading zoxide...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   617  100   617    0     0   2722      0 --:--:-- --:--:-- --:--:--  2730
100  862k  100  862k    0     0  1157k      0 --:--:-- --:--:-- --:--:-- 3102k
curl: Saved to filename 'zoxide-x86_64-apple-darwin'
Password:
zoxide is installed!
Please ensure that /usr/local/bin is added to your $PATH.

Though adding eval "$(zoxide init zsh)" to .zshrc throws:

zsh: defining function based on alias `z'
zsh: parse error near `()'

Intermittent database corruption

Twice in the last month, since I have started using zoxide, the database has become corrupted and I've lost my history.

This manifests as zoxide: could not read from database messages at each command prompt; ~/.zo is zero bytes.

I think this has something to do with killing a process using ctrl-c but I haven't been able to reproduce this yet. I'm using oh-my-zsh.

Antigen instructions wrong?

In readme.md, antigen instructions say to

antigen bundle zsh-users/zsh-syntax-highlighting

But I don't see how that can work. Indeed, the obvious

antigen bundle ajeetdsouza/zoxide

Seems to do the trick.

use XDG compatible locations for the database/configs?

It'd be nice to use standard config folders for this tool instead of just dropping configs and the database at the home folder for a user.

if you're interested about having this implemented, crates like this one can be used to accomplish this easily.

Happy to work on a PR if there's interest.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.