Skip to content

Add these 2 features in zoxide, 1. Add multiple directories path, 2. Remove multiple paths #1087

@rix4uni

Description

@rix4uni

I deleted zoxide 2 times because it was not fast and i watched some youtube videos and found out i don't have any paths in zoxide database so i added all paths of those directories i regularly visit's using zpath_add and removed some paths that are not important using zpath_remove.

Now my zoxide setup 10x faster than before
Please add these feature in zoxide it will more fast because zoxide written in rust.

zpath_add() {
  for base in "$@"; do
    find "$base" -type d -print0
  done | while IFS= read -r -d '' dir; do
    zoxide add "$dir"
    #echo "✅ Added: $dir"
  done
}
# zpath_add ~/.config ~/.garudrecon ~/some/other/path

# Recursive Add all directories path from input directories
~/.config
~/.config/waymore
~/.config/waymore/results
zpath_remove() {
  zoxide query -l | grep -E "$1" | while read -r dir; do
    zoxide remove "$dir"
    #echo "❌ Removed: $dir"
  done
}
# zpath_remove "~/.config|~/.garudrecon|sourcemapper"

# remove all paths anywhere input matches, e.g. "sourcemapper"
~/.garudrecon/scans/xyz.app/sourcemapper/cc-fe
~/.garudrecon/scans/xdfhfr.com/sourcemapper/gjh-pkj

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions