From efa3212dda514b9cab6498a0c8f028d6dfc63467 Mon Sep 17 00:00:00 2001 From: Maxim Likhachev Date: Tue, 19 Feb 2019 12:43:46 +0300 Subject: [PATCH] bash_linux: hotfix --- etc/shell/bash/aliases | 9 +-------- etc/shell/bash/aliases_linux | 10 ++++++++++ etc/shell/bash/bashrc | 6 +++--- etc/shell/bash/bashrc_linux | 4 ++++ 4 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 etc/shell/bash/aliases_linux diff --git a/etc/shell/bash/aliases b/etc/shell/bash/aliases index abe673f..23b2aea 100755 --- a/etc/shell/bash/aliases +++ b/etc/shell/bash/aliases @@ -22,19 +22,12 @@ alias cp='cp -i -v -r' #noindex alias rm="rm -i -v" #noindex alias rmdir="rmdir -v" #noindex -#- Алиасы для стандартных команд - -ls-with-icons() { ls-i --color=always -N -w $(tput cols) "$@"; } #noindex -dir-with-icons() { dir-i --color=always -N -w $(tput cols) "$@"; } #noindex -vdir-with-icons() { vdir-i --color=always -N -w $(tput cols) "$@"; } #noindex +#- Псевдонимы для стандартных команд alias gcc="gcc -Os -Wextra -Wall" #noindex alias g++="g++ -Os -Wall" #noindex alias echo="echo -e" #noindex alias less="less -R" #noindex -#alias ls='ls-with-icons -lGhpXv --color=always --group-directories-first' #noindex -#alias lsl='ls-with-icons -L' #noindex -#alias lst='ls-with-icons -al --time-style=+%D | grep $(\date +%D)' #noindex alias lss='\ls --format=single-column' #noindex alias nl="nl -b a" #noindex alias df='df -hT' #noindex diff --git a/etc/shell/bash/aliases_linux b/etc/shell/bash/aliases_linux new file mode 100644 index 0000000..6a3a212 --- /dev/null +++ b/etc/shell/bash/aliases_linux @@ -0,0 +1,10 @@ +# Псевдонимы + +ls-with-icons() { ls-i --color=always -N -w $(tput cols) "$@"; } #noindex +dir-with-icons() { dir-i --color=always -N -w $(tput cols) "$@"; } #noindex +vdir-with-icons() { vdir-i --color=always -N -w $(tput cols) "$@"; } #noindex + +alias ls='ls-with-icons -lGhpXv --color=always --group-directories-first' #noindex +alias lsl='ls-with-icons -L' #noindex +alias lst='ls-with-icons -al --time-style=+%D | grep $(\date +%D)' #noindex + diff --git a/etc/shell/bash/bashrc b/etc/shell/bash/bashrc index dfbec20..31d5162 100755 --- a/etc/shell/bash/bashrc +++ b/etc/shell/bash/bashrc @@ -1,6 +1,6 @@ #!/bin/bash #################################################################### # -# Изменён: вт 19 фев 2019 12:31:12 +# Изменён: Вт 19 фев 2019 12:43:30 # ################################################################################ @@ -178,8 +178,8 @@ path++ () { else export $2="${!2:+${!2}:}$i" fi - else - echo "$i is not a directory" >&2 + #else + #echo "$i is not a directory" >&2 fi done } diff --git a/etc/shell/bash/bashrc_linux b/etc/shell/bash/bashrc_linux index b184e00..4bc570e 100644 --- a/etc/shell/bash/bashrc_linux +++ b/etc/shell/bash/bashrc_linux @@ -15,3 +15,7 @@ shopt -s dirspell #Исправление имен директорий при [[ (-f $BASHRC/cdargs-bash.sh) ]] && . $BASHRC/cdargs-bash.sh +[[ -f $BASHRC/aliases_linux ]] && LINUX_ALIASES="$BASHRC/aliases_linux" \ + && . $LINUX_ALIASES \ + && HELPSRC+=("$LINUX_ALIASES") +