ZSH: Updated config

This commit is contained in:
2026-02-12 22:19:51 +01:00
parent 1d663f2a60
commit c813e48c26
13 changed files with 31 additions and 36 deletions

View File

@@ -10,12 +10,12 @@ function dc() {
# Save current working directory
CURRENT_DIR="${PWD}"
for file in $(find ${PWD} -maxdepth 2 -type f -regextype posix-extended -regex '.*(docker-compose|compose)\.ya?ml' | sort); do
cd $(dirname "$file")
docker compose $@
for file in $(find "${PWD}" -maxdepth 2 -type f \( -name "docker-compose.yml" -o -name "docker-compose.yaml" -o -name "compose.yml" -o -name "compose.yaml" \) | sort); do
cd "$(dirname "$file")"
docker compose "$@"
done
# Change back to saved working directory
cd ${CURRENT_DIR}
cd "${CURRENT_DIR}"
fi
}

View File

@@ -5,7 +5,7 @@ function extract() {
echo " extract <path/file_name_1.ext> [path/file_name_2.ext] [path/file_name_3.ext]"
return 1
else
for n in $@; do
for n in "$@"; do
if [ -f "$n" ]; then
case "${n%,}" in
*.tar.bz2 | *.tar.gz | *.tar.xz | *.tbz2 | *.tgz | *.txz | *.tar)

View File

@@ -3,19 +3,19 @@
function zwcautocompile() {
autoload -Uz zrecompile
for f in $(find ${ZDOTDIR} -maxdepth 3 -type f \( -name "*.zsh" -o -name ".zlogin" -o -name ".zshrc" \) ! -name "*.zwc" ! -name "*.zwc.old"); do
zrecompile -pq ${f} && rm -f ${f}.zwc.old
for f in $(find "${ZDOTDIR}" -maxdepth 3 -type f \( -name "*.zsh" -o -name ".zlogin" -o -name ".zshrc" \) ! -name "*.zwc" ! -name "*.zwc.old"); do
zrecompile -pq "${f}" && rm -f "${f}.zwc.old"
done
if [[ -d ${ZAUTOLOADDIR} ]]; then
for f in ${ZAUTOLOADDIR}/*; do
zrecompile -pq ${f} && rm -f ${f}.zwc.old
if [[ -d "${ZAUTOLOADDIR}" ]]; then
for f in "${ZAUTOLOADDIR}"/*; do
zrecompile -pq "${f}" && rm -f "${f}.zwc.old"
done
fi
if [[ -d ${ZLIBDIR} ]]; then
for f in ${ZLIBDIR}/*; do
zrecompile -pq ${f} && rm -f ${f}.zwc.old
if [[ -d "${ZLIBDIR}" ]]; then
for f in "${ZLIBDIR}"/*; do
zrecompile -pq "${f}" && rm -f "${f}.zwc.old"
done
fi
}

View File

@@ -2,7 +2,7 @@
function zwcpurge() {
autoload -Uz zrecompile
for zsh_file in $(find ${ZDOTDIR} -maxdepth 3 -type f \( -name "*.zwc" -o -name "*.zwc.old" \)); do
rm -f ${zsh_file}
for zsh_file in $(find "${ZDOTDIR}" -maxdepth 3 -type f \( -name "*.zwc" -o -name "*.zwc.old" \)); do
rm -f "${zsh_file}"
done
}