233e81db4e21215b22bc3bf934478ec5245e6510

Author
Vinfall <91039000+Vinfall@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

feat(command-not-found): support void linux (#13531)

Diff

 1diff --git a/plugins/command-not-found/README.md b/plugins/command-not-found/README.md
 2index 88761bb888f0165d9807bc0e56a24e53cafcfdd9..5079b1fb5bca26d179335f2374e81d081e4209d3 100644
 3--- a/plugins/command-not-found/README.md
 4+++ b/plugins/command-not-found/README.md
 5@@ -22,14 +22,15 @@ Try: sudo apt install <selected package>
 6 
 7 It works out of the box with the command-not-found packages for:
 8 
 9-- [Ubuntu](https://www.porcheron.info/command-not-found-for-zsh/)
10+- [Ubuntu](https://launchpad.net/ubuntu/+source/command-not-found)
11 - [Debian](https://packages.debian.org/search?keywords=command-not-found)
12-- [Arch Linux](https://wiki.archlinux.org/index.php/Pkgfile#Command_not_found)
13-- [macOS (Homebrew)](https://github.com/Homebrew/homebrew-command-not-found)
14+- [Arch Linux](https://wiki.archlinux.org/title/Zsh#pkgfile_"command_not_found"_handler)
15+- [macOS (Homebrew)](https://github.com/Homebrew/brew/blob/main/docs/Command-Not-Found.md)
16 - [Fedora](https://fedoraproject.org/wiki/Features/PackageKitCommandNotFound)
17 - [NixOS](https://github.com/NixOS/nixpkgs/tree/master/nixos/modules/programs/command-not-found)
18 - [Termux](https://github.com/termux/command-not-found)
19 - [SUSE](https://www.unix.com/man-page/suse/1/command-not-found/)
20 - [Gentoo](https://github.com/AndrewAmmerlaan/command-not-found-gentoo/tree/main)
21+- [Void Linux](https://codeberg.org/classabbyamp/xbps-command-not-found)
22 
23 You can add support for other platforms by submitting a Pull Request.
24diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh
25index 85d778004bf2c9cb6e604fe8f8cd676a4bc3d559..a85dbfdc3736f2f30f9fc4581f56f69e2aa3177c 100644
26--- a/plugins/command-not-found/command-not-found.plugin.zsh
27+++ b/plugins/command-not-found/command-not-found.plugin.zsh
28@@ -1,13 +1,15 @@
29 ## Platforms with a built-in command-not-found handler init file
30 
31 for file (
32-  # Arch Linux. Must have pkgfile installed: https://wiki.archlinux.org/index.php/Pkgfile#Command_not_found
33+  # Arch Linux. Must have pkgfile installed: https://wiki.archlinux.org/title/Zsh#pkgfile_"command_not_found"_handler
34   /usr/share/doc/pkgfile/command-not-found.zsh
35-  # Homebrew: https://github.com/Homebrew/homebrew-command-not-found
36+  # Void Linux: https://codeberg.org/classabbyamp/xbps-command-not-found
37+  /usr/share/zsh/plugins/xbps-command-not-found/xbps-command-not-found.zsh
38+  # Homebrew: https://github.com/Homebrew/brew/blob/main/docs/Command-Not-Found.md
39   /opt/homebrew/Library/Homebrew/command-not-found/handler.sh
40   /usr/local/Homebrew/Library/Homebrew/command-not-found/handler.sh
41   /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/command-not-found/handler.sh
42-	# Old homebrew implementation
43+  # Old homebrew implementation
44   /opt/homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh
45   /usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh
46   /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh