-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfinder
More file actions
executable file
·15 lines (13 loc) · 1.09 KB
/
finder
File metadata and controls
executable file
·15 lines (13 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
regen()
{
/usr/bin/find "$1" -type f ! -path "$HOME/anaconda3/*" ! -path "$HOME/.config/coc/*" ! -path "$HOME/scripts/*" ! -path "$HOME/.local/share/*" ! -path "$HOME/.local/lib/*" ! -path "$HOME/.config/libreoffice/*" ! -path "$HOME/.local/include/*" ! -path "$HOME/.local/state/*" ! -path "*.part" ! -path "*/.git/*" ! -path "*.mp3" ! -path "*.mp4" ! -path "*.mkv" ! -path "*.pdf" ! -path "*.djvu" ! -path "*.png" ! -path "*.jpg" ! -path "*.webm" ! -path "*.iso" ! -path "*.svg" ! -path "*.xbm" ! -path "$HOME/storage/Mail/*" ! -path "*/home/kirito/.local/share/Trash/*" ! -path "*/.mozilla/*" ! -path "*/.cache/*" ! -path "*/.config/google-chrome*" ! -path "*/watch_later/*" ! -path "*/.vim/plugged/*" ! -path "*/.vim/undo/*" ! -path "*/miniconda3/*" ! -path "*.rb" ! -path "*/vendor/*" ! -path "*.gemspec" ! -path "*/.bundle/cache/*" ! -path "*.jpeg" ! -path "*/Games/*" ! -path "*.qu" 2> /dev/null
}
[ -n "$1" ] && builtin cd "$1" || exit
dir=$(pwd)
if [ "$dir" = "$HOME" ]; then
/usr/bin/cat ~/.cache/finderlist || regen "$dir"
regen "$dir" &> ~/.cache/finderlist &
else
regen "$dir"
fi