From 6774bb1c37a397a1d9ab72b0a4281f1981ecaaa9 Mon Sep 17 00:00:00 2001 From: zou_lin77 Date: Tue, 5 Jul 2022 16:55:44 +0800 Subject: [PATCH] add alias.sh --- bash.spec | 11 ++++++++++- cd-alias.patch | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 cd-alias.patch diff --git a/bash.spec b/bash.spec index 068bbb7..1a062d6 100644 --- a/bash.spec +++ b/bash.spec @@ -1,6 +1,6 @@ Name: bash Version: 5.1.8 -Release: 1 +Release: 2 Summary: It is the Bourne Again Shell License: GPLv3 URL: https://www.gnu.org/software/bash @@ -22,6 +22,7 @@ Patch133: bash-4.3-noecho.patch Patch134: bash-4.3-memleak-lc_all.patch Patch137: bugfix-Forbidden-non-root-user-to-clear-history.patch Patch138: enable-dot-logout-and-source-bashrc-through-ssh.patch +Patch139: cd-alias.patch BuildRequires: gcc bison texinfo autoconf ncurses-devel # Required for bash tests @@ -73,6 +74,7 @@ ln -sf bash %{buildroot}%{_bindir}/sh install -pDm 644 %SOURCE1 %{buildroot}/etc/skel/.bashrc install -pDm 644 %SOURCE2 %{buildroot}/etc/skel/.bash_profile install -pDm 644 %SOURCE3 %{buildroot}/etc/skel/.bash_logout +install -pDm 644 ./configs/alias.sh %{buildroot}%{_sysconfdir}/profile.d/alias.sh # bug #820192, need to add execable alternatives for regular built-ins for ea in alias bg cd command fc fg getopts hash jobs read type ulimit umask unalias wait @@ -95,6 +97,7 @@ make check %config(noreplace) /etc/skel/.b* %{_bindir}/{sh,bash,alias,bg,cd,command,fc,fg,wait,bashbug} %{_bindir}/{hash,getopts,jobs,read,type,ulimit,umask,unalias} +%config(noreplace) %{_sysconfdir}/profile.d/alias.sh %files devel %defattr(-,root,root) @@ -113,6 +116,12 @@ make check %exclude %{_infodir}/dir %changelog +* Tue Jul 5 2022 zoulin - 5.1.8-2 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC: add alias.sh + * Thu Dec 2 2021 wangjie - 5.1.8-1 - Type:enhancement - ID:NA diff --git a/cd-alias.patch b/cd-alias.patch new file mode 100644 index 0000000..d870a70 --- /dev/null +++ b/cd-alias.patch @@ -0,0 +1,22 @@ +From f6a9a357599631e114a3a574591b411d515949eb Mon Sep 17 00:00:00 2001 +From: licunlong +Date: Tue, 5 Jul 2022 16:07:47 +0800 +Subject: [PATCH] cd alias + +--- + configs/alias.sh | 4 ++++ + 1 file changed, 4 insertions(+) + create mode 100644 configs/alias.sh + +diff --git a/configs/alias.sh b/configs/alias.sh +new file mode 100644 +index 0000000..563121b +--- /dev/null ++++ b/configs/alias.sh +@@ -0,0 +1,4 @@ ++# User specific aliases and functions ++ ++alias ..='cd ..' ++alias ...='cd ../..' +-- +2.27.0 -- Gitee