Files
RedBear-OS/recipes/shells/zsh/source/Functions/Chpwd/chpwd_recent_add
T
vasilito ff4ff35918 feat: track all source trees in git — full fork offline-first model
Red Bear OS is a full fork. All sources must be available from git clone
with zero network access. Removed gitignore rules that excluded fetched
source trees under recipes/*/source/, local/recipes/kde/*/source/,
local/recipes/qt/*/source/, and vendor source trees.

Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded.

127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt
frameworks, mesa, wayland, DRM drivers, and every other recipe source.
2026-05-14 10:55:53 +01:00

25 lines
506 B
Plaintext

# Helper for chpwd_recent_dirs.
# Add a directory to the reply array unless we're skipping it.
# If skipping, return non-zero status.
local pat
local add=$1
local -a prune patterns
zstyle -a ':chpwd:' recent-dirs-prune prune
if (( ${#prune} )); then
patterns=(${${prune:#^pattern:*}##pattern:})
fi
for pat in $patterns; do
if [[ $add =~ ${~pat} ]]; then
return 1
fi
done
if [[ ${prune[(I)parent]} -ne 0 && $add = $reply[1]/* ]]; then
# replace
reply=($reply[2,-1])
fi
reply=($add $reply)