Comments (5)
Can you paste the contents of your .zshrc file here?
from zoxide.
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
zstyle ':omz:update' mode auto
zstyle ':omz:update' frequency 13
plugins=(git history encode64 macos zsh-autosuggestions zsh-syntax-highlighting zsh-completions zoxide fzf)
source $ZSH/oh-my-zsh.sh
fpath+=("$(brew --prefix)/share/zsh/site-functions")
autoload -U promptinit; promptinit
prompt pure
export FZF_BASE=/opt/homebrew/bin/fzf
from zoxide.
What's the output of zoxide init zsh
?
from zoxide.
# =============================================================================
#
# Utility functions for zoxide.
#
# pwd based on the value of _ZO_RESOLVE_SYMLINKS.
function __zoxide_pwd() {
\builtin pwd -L
}
# cd + custom logic based on the value of _ZO_ECHO.
function __zoxide_cd() {
# shellcheck disable=SC2164
\builtin cd -- "$@"
}
# =============================================================================
#
# Hook configuration for zoxide.
#
# Hook to add new entries to the database.
function __zoxide_hook() {
# shellcheck disable=SC2312
\command zoxide add -- "$(__zoxide_pwd)"
}
# Initialize hook.
# shellcheck disable=SC2154
if [[ ${precmd_functions[(Ie)__zoxide_hook]:-} -eq 0 ]] && [[ ${chpwd_functions[(Ie)__zoxide_hook]:-} -eq 0 ]]; then
chpwd_functions+=(__zoxide_hook)
fi
# =============================================================================
#
# When using zoxide with --no-cmd, alias these internal functions as desired.
#
# Jump to a directory using only keywords.
function __zoxide_z() {
# shellcheck disable=SC2199
if [[ "$#" -eq 0 ]]; then
__zoxide_cd ~
elif [[ "$#" -eq 1 ]] && { [[ -d "$1" ]] || [[ "$1" = '-' ]] || [[ "$1" =~ ^[-+][0-9]$ ]]; }; then
__zoxide_cd "$1"
else
\builtin local result
# shellcheck disable=SC2312
result="$(\command zoxide query --exclude "$(__zoxide_pwd)" -- "$@")" && __zoxide_cd "${result}"
fi
}
# Jump to a directory using interactive search.
function __zoxide_zi() {
\builtin local result
result="$(\command zoxide query --interactive -- "$@")" && __zoxide_cd "${result}"
}
# =============================================================================
#
# Commands for zoxide. Disable these using --no-cmd.
#
function z() {
__zoxide_z "$@"
}
function zi() {
__zoxide_zi "$@"
}
# Completions.
if [[ -o zle ]]; then
__zoxide_result=''
function __zoxide_z_complete() {
# Only show completions when the cursor is at the end of the line.
# shellcheck disable=SC2154
[[ "${#words[@]}" -eq "${CURRENT}" ]] || return 0
if [[ "${#words[@]}" -eq 2 ]]; then
# Show completions for local directories.
_files -/
elif [[ "${words[-1]}" == '' ]]; then
# Show completions for Space-Tab.
# shellcheck disable=SC2086
__zoxide_result="$(\command zoxide query --exclude "$(__zoxide_pwd || \builtin true)" --interactive -- ${words[2,-1]})" || __zoxide_result=''
# Bind '\e[0n' to helper function.
\builtin bindkey '\e[0n' '__zoxide_z_complete_helper'
# Send '\e[0n' to console input.
\builtin printf '\e[5n'
fi
# Report that the completion was successful, so that we don't fall back
# to another completion function.
return 0
}
function __zoxide_z_complete_helper() {
if [[ -n "${__zoxide_result}" ]]; then
# shellcheck disable=SC2034,SC2296
BUFFER="z ${(q-)__zoxide_result}"
\builtin zle reset-prompt
\builtin zle accept-line
else
\builtin zle reset-prompt
fi
}
\builtin zle -N __zoxide_z_complete_helper
[[ "${+functions[compdef]}" -ne 0 ]] && \compdef __zoxide_z_complete z
fi
# =============================================================================
#
# To initialize zoxide, add this to your configuration (usually ~/.zshrc):
#
# eval "$(zoxide init zsh)"
from zoxide.
Sorry, I am not experiencing the issue reported any longer. I am unsure why.
from zoxide.
Related Issues (20)
- Feature request: "z . some keywords" to find matches in current directory HOT 2
- New Command Idea: Env
- Zoxide "zi" hangs when mount point is in list (/mnt) that's unavailable HOT 1
- Provide a way to configure where a bare `z` command goes HOT 1
- Feature Request: Automatic Backup and Recovery for db.zo HOT 6
- Zoxide's init-script generated for nu-shell fails with error upon sourcing HOT 4
- __zoxide_cd:cd:2: no such file or directory: world! HOT 4
- Autocompletion for fish is not working on my system HOT 4
- Installation using shell script is not working in macOS HOT 1
- aarch64-linux-android not packaged HOT 1
- Feature request: Add directory history support HOT 2
- Feature request: Allow manually specifying high priority paths. HOT 2
- zoxide doesn't go to the previous directory HOT 9
- variant of z/zi but only return the found path without changing directories HOT 1
- Partial match high priority nested path over exact direct descendent (edge-case) HOT 5
- zoxide: no match found
- Error: zoxide has not yet been packaged for your architecture HOT 3
- Directory Color Issues in Interactive Mode HOT 2
- .zoxide.nu method breaks with the latest 0.94.0 release HOT 3
- Nushell failure on `z` for keyword not under $env.PWD HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zoxide.