From 91f63c0b6895433b1dc08aa879878e4761aa56cf Mon Sep 17 00:00:00 2001 From: zuck007 Date: Fri, 15 Apr 2016 11:34:51 +0530 Subject: [PATCH 1/5] adding dnf aliases for fedora distro --- aliases/available/fedora.aliases.bash | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 aliases/available/fedora.aliases.bash diff --git a/aliases/available/fedora.aliases.bash b/aliases/available/fedora.aliases.bash new file mode 100644 index 0000000000..1f54e19329 --- /dev/null +++ b/aliases/available/fedora.aliases.bash @@ -0,0 +1,28 @@ +#!/bin/bash +#zuck007 +cite 'about-alias' +about-alias 'dnf aliases for fedora 22+ distros' + +#set-dnf-aliases +function _set_dnf_aliases() +{ + if [ -x $(which dnf) ];then + + 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 + + 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 + fi +} + +_set_dnf_aliases + From 2ae03668c4f42455a241fe80021f14224ffd1341 Mon Sep 17 00:00:00 2001 From: zuck007 Date: Fri, 15 Apr 2016 11:42:13 +0530 Subject: [PATCH 2/5] added dnf aliases for fedora distro --- aliases/available/{fedora.aliases.bash => dnf.aliases.bash} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename aliases/available/{fedora.aliases.bash => dnf.aliases.bash} (100%) diff --git a/aliases/available/fedora.aliases.bash b/aliases/available/dnf.aliases.bash similarity index 100% rename from aliases/available/fedora.aliases.bash rename to aliases/available/dnf.aliases.bash From f18562279c2c87ab3ee70bac4622aeed1b95b6f4 Mon Sep 17 00:00:00 2001 From: zuck007 Date: Fri, 15 Apr 2016 12:02:46 +0530 Subject: [PATCH 3/5] dnf aliases for fedora_22+ distros --- aliases/available/dnf.aliases.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aliases/available/dnf.aliases.bash b/aliases/available/dnf.aliases.bash index 1f54e19329..0d6d86e835 100644 --- a/aliases/available/dnf.aliases.bash +++ b/aliases/available/dnf.aliases.bash @@ -17,12 +17,12 @@ function _set_dnf_aliases() alias dnfu="sudo dnf upgrade" # Upgrade package alias dnfi="sudo dnf install" # Install package + alias dnfri='sudo dnf reinstall' # Reinstall 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 fi } - _set_dnf_aliases From 73d28f0b272a3b4c709d4c13872089071d90f840 Mon Sep 17 00:00:00 2001 From: zuck007 Date: Fri, 15 Apr 2016 18:04:46 +0530 Subject: [PATCH 4/5] removing redundant lines --- aliases/available/dnf.aliases.bash | 36 ++++++++++++------------------ 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/aliases/available/dnf.aliases.bash b/aliases/available/dnf.aliases.bash index 0d6d86e835..5bc6377e70 100644 --- a/aliases/available/dnf.aliases.bash +++ b/aliases/available/dnf.aliases.bash @@ -3,26 +3,18 @@ cite 'about-alias' about-alias 'dnf aliases for fedora 22+ distros' -#set-dnf-aliases -function _set_dnf_aliases() -{ - if [ -x $(which dnf) ];then - - 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 - - alias dnfu="sudo dnf upgrade" # Upgrade package - alias dnfi="sudo dnf install" # Install package - alias dnfri='sudo dnf reinstall' # Reinstall 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 - fi -} -_set_dnf_aliases + +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 +alias dnfu="sudo dnf upgrade" # Upgrade package +alias dnfi="sudo dnf install" # Install package +alias dnfri='sudo dnf reinstall' # Reinstall 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 From 342ddcfca061ba8342a842834eb8101472a53c1f Mon Sep 17 00:00:00 2001 From: Noah Gorny Date: Sat, 9 Jan 2021 19:03:05 +0200 Subject: [PATCH 5/5] Add dnf.aliases.bash to clean_files.txt --- aliases/available/dnf.aliases.bash | 4 +--- clean_files.txt | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/aliases/available/dnf.aliases.bash b/aliases/available/dnf.aliases.bash index 5bc6377e70..974cb19b2c 100644 --- a/aliases/available/dnf.aliases.bash +++ b/aliases/available/dnf.aliases.bash @@ -1,9 +1,7 @@ -#!/bin/bash -#zuck007 +# shellcheck shell=bash cite 'about-alias' about-alias 'dnf aliases for fedora 22+ distros' - alias dnfl="dnf list" # List packages alias dnfli="dnf list installed" # List installed packages alias dnfgl="dnf grouplist" # List package groups diff --git a/clean_files.txt b/clean_files.txt index e02900c67a..855221124b 100644 --- a/clean_files.txt +++ b/clean_files.txt @@ -46,4 +46,5 @@ completion/available/vault.completion.bash completion/available/sdkman.completion.bash # aliases +aliases/available/dnf.aliases.bash aliases/available/vim.aliases.bash