Somebody set up us the bomb.

This commit is contained in:
2026-06-06 18:44:07 +05:30
parent cc05650362
commit 09fc56d597
6 changed files with 45 additions and 7 deletions
+32
View File
@@ -315,4 +315,36 @@ vpn() {
doas systemctl $query openvpn-client@vpn.service && printf "Openvpn %sed" "$query"
}
command_not_found_handler() {
local purple='\e[1;35m' bright='\e[0;1m' green='\e[1;32m' reset='\e[0m'
printf 'zsh: command not found: %s\n' "$1"
local entries=(
${(f)"$(/usr/bin/pacman -F --machinereadable -- "/usr/bin/$1")"}
)
if (( ${#entries[@]} ))
then
printf "${bright}$1${reset} may be found in the following packages:\n"
local pkg
for entry in "${entries[@]}"
do
# (repo package version file)
local fields=(
${(0)entry}
)
if [[ "$pkg" != "${fields[2]}" ]]
then
printf "${purple}%s/${bright}%s ${green}%s${reset}\n" "${fields[1]}" "${fields[2]}" "${fields[3]}"
fi
printf ' /%s\n' "${fields[4]}"
pkg="${fields[2]}"
done
fi
return 127
}
gen_string() {
head /dev/urandom | tr -cd "${2:-[:alnum:]}" | cut -c-${1:-12}
}
# vim: ft=zsh
+1
View File
@@ -45,6 +45,7 @@ fpath=($HOME/.config/zsh/completions $fpath)
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
trap 'rehash' USR1
eval "$(starship init zsh)"
#plugins