summaryrefslogtreecommitdiff
path: root/ar
diff options
context:
space:
mode:
Diffstat (limited to 'ar')
-rwxr-xr-xar/.local/bin/fzffiles8
-rwxr-xr-xar/.local/bin/rgafiles28
2 files changed, 30 insertions, 6 deletions
diff --git a/ar/.local/bin/fzffiles b/ar/.local/bin/fzffiles
index 0c48e17..5b88efc 100755
--- a/ar/.local/bin/fzffiles
+++ b/ar/.local/bin/fzffiles
@@ -46,10 +46,10 @@ files=$(fzf-tmux \
--multi \
--exit-0 \
--prompt " 💡 " \
- --bind "ctrl-a:change-prompt( ⚡ )+reload(fd -H -L -t f -E .Trash -E .git -E .cache . $PWD)" \
- --bind "ctrl-b:change-prompt( 🌎 )+reload(fd -H -L -t f -E .Trash -E .git -E .cache . ${XDG_PUBLICSHARE_DIR:-${HOME}/Public})" \
- --bind "ctrl-d:change-prompt( ⚙️ )+reload(fd -H -L -t f -E .Trash -E .git -E .cache . ${XDG_DOTFILES_DIR:-${HOME}/.dotfiles})" \
- --bind "ctrl-f:change-prompt( 🗂️ )+reload(fd -H -L -t f -E .Trash -E .git -E .cache . ${XDG_CONFIG_HOME:-${HOME}/.config})" \
+ --bind "ctrl-a:change-prompt( ⚡ )+reload(fd -H -L -t f -E .Trash -E .git -E .cache -E node_modules -E .next -E dist -E build -E coverage -E target -E vendor -E .venv -E venv . $PWD)" \
+ --bind "ctrl-b:change-prompt( 🌎 )+reload(fd -H -L -t f -E .Trash -E .git -E .cache -E node_modules -E .next -E dist -E build -E coverage -E target -E vendor -E .venv -E venv . ${XDG_PUBLICSHARE_DIR:-${HOME}/Public})" \
+ --bind "ctrl-d:change-prompt( ⚙️ )+reload(fd -H -L -t f -E .Trash -E .git -E .cache -E node_modules -E .next -E dist -E build -E coverage -E target -E vendor -E .venv -E venv . ${XDG_DOTFILES_DIR:-${HOME}/.dotfiles})" \
+ --bind "ctrl-f:change-prompt( 🗂️ )+reload(fd -H -L -t f -E .Trash -E .git -E .cache -E node_modules -E .next -E dist -E build -E coverage -E target -E vendor -E .venv -E venv . ${XDG_CONFIG_HOME:-${HOME}/.config})" \
--bind "ctrl-g:change-prompt(  )+reload(fd -H -L -t f -E .Trash -E .git -E .cache . $HOME/Private/repos $HOME/Public/repos)" \
--bind "ctrl-h:change-prompt( 🏠 )+reload(fd -H -L -t f -E .Trash -E .git -E .cache . $HOME)" \
--bind "ctrl-k:change-prompt( 🖥️ )+reload(fd -H -L -t f -E .Trash -E .git -E .cache . ${XDG_DESKTOP_DIR:-${HOME}/Desktop})" \
diff --git a/ar/.local/bin/rgafiles b/ar/.local/bin/rgafiles
index e8b5e72..1a396df 100755
--- a/ar/.local/bin/rgafiles
+++ b/ar/.local/bin/rgafiles
@@ -36,7 +36,19 @@ search_term() {
# Construct the preview command
preview_cmd=$(printf "rga %s --pretty --context 10 '%s' {}" "$case_flag" "$*")
- rga_output=$(rga --follow --no-ignore --hidden --text --max-count=1 ${case_flag:+$case_flag} --files-with-matches --no-messages --glob '!**/.git/*' "$*")
+ rga_output=$(rga --follow --no-ignore --hidden --text --max-count=1 ${case_flag:+$case_flag} --files-with-matches --no-messages \
+ --glob '!**/.git/*' \
+ --glob '!**/node_modules/*' \
+ --glob '!**/.next/*' \
+ --glob '!**/dist/*' \
+ --glob '!**/build/*' \
+ --glob '!**/.cache/*' \
+ --glob '!**/coverage/*' \
+ --glob '!**/target/*' \
+ --glob '!**/vendor/*' \
+ --glob '!**/.venv/*' \
+ --glob '!**/venv/*' \
+ "$*")
# Use fzf to select files
files=$(echo "$rga_output" | fzf-tmux +m --preview="$preview_cmd" --reverse --multi --select-1 --exit-0) || return 1
@@ -68,7 +80,19 @@ list_or_open_project_files() {
rga_output=""
for path in $project_paths; do
if [ -d "$path" ]; then
- rga_result=$(rga --follow --no-ignore --hidden --text --max-count=1 --files-with-matches --no-messages --glob '!**/.git/*' "$project_tag" "$path")
+ rga_result=$(rga --follow --no-ignore --hidden --text --max-count=1 --files-with-matches --no-messages \
+ --glob '!**/.cache/*' \
+ --glob '!**/.git/*' \
+ --glob '!**/.next/*' \
+ --glob '!**/.venv/*' \
+ --glob '!**/build/*' \
+ --glob '!**/coverage/*' \
+ --glob '!**/dist/*' \
+ --glob '!**/node_modules/*' \
+ --glob '!**/target/*' \
+ --glob '!**/vendor/*' \
+ --glob '!**/venv/*' \
+ "$project_tag" "$path")
rga_output="$rga_output $rga_result"
fi
done