Compare commits

..

3 Commits

Author SHA1 Message Date
ed3eeb9459 Removed youtube-dl config 2024-10-29 14:00:02 +01:00
384dcae932 ZSH: Linted files 2024-10-29 13:59:15 +01:00
864f0805ba ZSH: Added prepend-sudo plugin 2024-10-29 13:58:26 +01:00
8 changed files with 30 additions and 27 deletions

View File

@ -1,5 +0,0 @@
-o "%(title)s [%(id)s].%(ext)s"
-f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best"
--add-metadata
--geo-bypass
--continue

View File

@ -1,14 +1,21 @@
# Search for docker-compose files in the current and all sub direcotries and run docker compose with provided arguments
function dc() {
if [ -z "$1" ]; then
# display usage if no parameters given
echo "Search for docker-compose files in the current and all sub direcotries and run docker compose with provided arguments"
echo "Usage: dc <docker compose commands>"
return 1
else
# 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 $@
cd $(dirname "$file")
docker compose $@
done
# Change back to saved working directory
cd ${CURRENT_DIR}
fi
}

View File

@ -1,21 +1,21 @@
## Automatically compile all compilable files to zwc
function zwcautocompile () {
function zwcautocompile() {
autoload -Uz zrecompile
for zsh_file in $(find ${ZDOTDIR} -maxdepth 3 -type f \( -name "*.zsh" -o -name ".zlogin" -o -name ".zshrc" \) ! -name "*.zwc" ! -name "*.zwc.old"); do
zrecompile -pq $zsh_file && rm -f $zsh_file.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
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
zrecompile -pq ${f} && rm -f ${f}.zwc.old
done
fi
}

View File

@ -1,8 +1,8 @@
## Purge all compiled zwc files
function zwcpurge () {
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}
rm -f ${zsh_file}
done
}

View File

@ -2,10 +2,10 @@
if [[ -d "${ZAUTOLOADDIR}" ]]; then
fpath=($fpath ${ZAUTOLOADDIR})
fpath=($fpath ${ZAUTOLOADDIR})
# Load functions
for func in ${ZAUTOLOADDIR}/*; do
autoload -Uz ${func:t}
done
# Load functions
for func in ${ZAUTOLOADDIR}/*; do
autoload -Uz ${func:t}
done
fi

View File

@ -21,6 +21,5 @@ export PYTHONUSERBASE=${HOME}/.local
export INPUTRC="${XDG_CONFIG_HOME}/readline/inputrc"
export MANPATH="${MANPATH-$(manpath)}:${HOME}/.local/share/man"
# EZA
EZA_CONFIG_DIR=${XDG_CONFIG_HOME}/eza

View File

@ -1,4 +1,5 @@
# zsh-history-substring-search configuration
# Keybindings
bindkey '^[[A' history-substring-search-up # or '\eOA'
bindkey '^[[B' history-substring-search-down # or '\eOB'
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1

View File

@ -21,6 +21,7 @@ plugin_repos=(
zsh-users/zsh-autosuggestions
zsh-users/zsh-syntax-highlighting
kulynyak/zsh.prepend-sudo
zsh-users/zsh-history-substring-search
)