summaryrefslogtreecommitdiff
path: root/ar/.config/zsh/scripts.zsh
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-03-09 22:03:28 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-03-09 22:03:28 +0900
commit1853f713625558299d5e8982b9d2a8d0ff2dbc8d (patch)
treec089596b8c5052dd827c39813572b635c76d89f2 /ar/.config/zsh/scripts.zsh
parent56df043d5906aac93e4345528c5f9a6541f5b14e (diff)
updates
Diffstat (limited to 'ar/.config/zsh/scripts.zsh')
-rw-r--r--ar/.config/zsh/scripts.zsh5
1 files changed, 3 insertions, 2 deletions
diff --git a/ar/.config/zsh/scripts.zsh b/ar/.config/zsh/scripts.zsh
index 8a45ae5..05561d7 100644
--- a/ar/.config/zsh/scripts.zsh
+++ b/ar/.config/zsh/scripts.zsh
@@ -293,8 +293,9 @@ function fzf_directory() {
# search scripts in ~/.local/bin
alias sscs=search_scripts
function search_scripts() {
- choice="$(find ~/.local/bin -mindepth 1 \( -type f -o -type l \) -not -name '*.md' -not -path '*/zsh/*' -printf '%P\n' | fzf --cycle)"
- ([ -n "$choice" ] && [ -f "$HOME/.local/bin/$choice" ]) && ${EDITOR:-nvim} "$HOME/.local/bin/$choice"
+ scripts=("${HOME}/.local/bin/"**/*(.))
+ choice="$(print -lnr ${scripts:t:r} | fzf)"
+ [[ "${choice}" ]] && "${EDITOR}" ${${(M)scripts:#*/${choice}*}[1]}
}
# check git status by directories in specific path