mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2025-11-04 13:21:19 +08:00 
			
		
		
		
	feat(dnf): use dnf5 if available (#11904)
				
					
				
			Co-authored-by: Marcus Müller <marcus_ohmyzsh@baseband.digital>
This commit is contained in:
		
							parent
							
								
									1cc32be5f6
								
							
						
					
					
						commit
						1c55a0fe52
					
				@ -10,6 +10,9 @@ To use it, add `dnf` to the plugins array in your zshrc file:
 | 
			
		||||
plugins=(... dnf)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Classic `dnf` is getting superseded by `dnf5`; this plugin detects the presence
 | 
			
		||||
of `dnf5` and uses it as drop-in alternative to the slower `dnf`.
 | 
			
		||||
 | 
			
		||||
## Aliases
 | 
			
		||||
 | 
			
		||||
| Alias | Command                 | Description              |
 | 
			
		||||
 | 
			
		||||
@ -1,15 +1,19 @@
 | 
			
		||||
## Aliases
 | 
			
		||||
local dnfprog="dnf"
 | 
			
		||||
 | 
			
		||||
alias dnfl="dnf list"                       # List packages
 | 
			
		||||
alias dnfli="dnf list installed"            # List installed packages
 | 
			
		||||
alias dnfgl="dnf grouplist"                 # List package groups
 | 
			
		||||
alias dnfmc="dnf makecache"                 # Generate metadata cache
 | 
			
		||||
alias dnfp="dnf info"                       # Show package information
 | 
			
		||||
alias dnfs="dnf search"                     # Search package
 | 
			
		||||
# Prefer dnf5 if installed
 | 
			
		||||
command -v dnf5 > /dev/null && dnfprog=dnf5
 | 
			
		||||
 | 
			
		||||
alias dnfu="sudo dnf upgrade"               # Upgrade package
 | 
			
		||||
alias dnfi="sudo dnf install"               # Install package
 | 
			
		||||
alias dnfgi="sudo dnf groupinstall"         # Install package group
 | 
			
		||||
alias dnfr="sudo dnf remove"                # Remove package
 | 
			
		||||
alias dnfgr="sudo dnf groupremove"          # Remove package group
 | 
			
		||||
alias dnfc="sudo dnf clean all"             # Clean cache
 | 
			
		||||
alias dnfl="${dnfprog} list"                       # List packages
 | 
			
		||||
alias dnfli="${dnfprog} list installed"            # List installed packages
 | 
			
		||||
alias dnfgl="${dnfprog} grouplist"                 # List package groups
 | 
			
		||||
alias dnfmc="${dnfprog} makecache"                 # Generate metadata cache
 | 
			
		||||
alias dnfp="${dnfprog} info"                       # Show package information
 | 
			
		||||
alias dnfs="${dnfprog} search"                     # Search package
 | 
			
		||||
 | 
			
		||||
alias dnfu="sudo ${dnfprog} upgrade"               # Upgrade package
 | 
			
		||||
alias dnfi="sudo ${dnfprog} install"               # Install package
 | 
			
		||||
alias dnfgi="sudo ${dnfprog} groupinstall"         # Install package group
 | 
			
		||||
alias dnfr="sudo ${dnfprog} remove"                # Remove package
 | 
			
		||||
alias dnfgr="sudo ${dnfprog} groupremove"          # Remove package group
 | 
			
		||||
alias dnfc="sudo ${dnfprog} clean all"             # Clean cache
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user