diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 3e547d358..b4e95e0ff 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -124,9 +124,11 @@ fi if [[ "$ZSH_DISABLE_COMPFIX" != true ]]; then source "$ZSH/lib/compfix.zsh" # Load only from secure directories + # Reset the flag compinit sets when -i excludes insecure entries + unset _comp_secure compinit -i -d "$ZSH_COMPDUMP" # If completion insecurities exist, warn the user - handle_completion_insecurities &| + [[ "$_comp_secure" == yes ]] && handle_completion_insecurities &| else # If the user wants it, load from all found directories compinit -u -d "$ZSH_COMPDUMP" diff --git a/plugins/command-not-found/README.md b/plugins/command-not-found/README.md index 5079b1fb5..81f90adfa 100644 --- a/plugins/command-not-found/README.md +++ b/plugins/command-not-found/README.md @@ -32,5 +32,6 @@ It works out of the box with the command-not-found packages for: - [SUSE](https://www.unix.com/man-page/suse/1/command-not-found/) - [Gentoo](https://github.com/AndrewAmmerlaan/command-not-found-gentoo/tree/main) - [Void Linux](https://codeberg.org/classabbyamp/xbps-command-not-found) +- [Alpine Linux](https://pkgs.alpinelinux.org/package/edge/main/x86_64/command-not-found) You can add support for other platforms by submitting a Pull Request. diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh index a85dbfdc3..59a86e7d5 100644 --- a/plugins/command-not-found/command-not-found.plugin.zsh +++ b/plugins/command-not-found/command-not-found.plugin.zsh @@ -74,3 +74,10 @@ if [[ -x /usr/bin/command-not-found ]]; then /usr/bin/command-not-found "$1" } fi + +# Alpine: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/command-not-found/APKBUILD +if [[ -x /usr/libexec/command-not-found ]]; then + command_not_found_handler() { + /usr/libexec/command-not-found "$1" + } +fi diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh index fa7e5f786..6c26b45f5 100644 --- a/plugins/systemadmin/systemadmin.plugin.zsh +++ b/plugins/systemadmin/systemadmin.plugin.zsh @@ -28,6 +28,8 @@ alias mkdir='mkdir -pv' # get top process eating memory alias psmem='ps -e -orss=,args= | sort -b -k1 -nr' alias psmem10='ps -e -orss=,args= | sort -b -k1 -nr | head -n 10' +# list all zombie processes with ownership and parent process details +alias pszombie="ps -eo user,pid,ppid,state,cmd | awk '\$4==\"Z\"'" # get top process eating cpu if not work try execute : export LC_ALL='C' alias pscpu='ps -e -o pcpu,cpu,nice,state,cputime,args | sort -k1,1n -nr' alias pscpu10='ps -e -o pcpu,cpu,nice,state,cputime,args | sort -k1,1n -nr | head -n 10' @@ -177,10 +179,10 @@ function getip() { fi } -# Clear zombie processes -function clrz() { - ps -eal | awk '{ if ($2 == "Z") {print $4}}' | kill -9 -} +## Clear zombie processes +#function clrz() { +# ps -eal | awk '{ if ($2 == "Z") {print $4}}' | kill -9 +#} # Second concurrent function conssec() {