Browse Source

aliases: fix sed version

Maxim Likhachev 4 years ago
parent
commit
aaf71d264d
  1. 30
      etc/shell/bash/aliases
  2. 2
      etc/shell/bash/bashrc_macos

30
etc/shell/bash/aliases

@ -460,19 +460,19 @@ realurl() { @@ -460,19 +460,19 @@ realurl() {
#- Подсветка выражений
clr() {
case "$1" in
-bb) sed -r -e "s/$2/`echo -e "\033"`[7;34m&`echo -e "\033"`[1;0m/g";;
-bc) sed -r -e "s/$2/`echo -e "\033"`[7;36m&`echo -e "\033"`[1;0m/g";;
-bg) sed -r -e "s/$2/`echo -e "\033"`[7;32m&`echo -e "\033"`[1;0m/g";;
-br) sed -r -e "s/$2/`echo -e "\033"`[7;31m&`echo -e "\033"`[1;0m/g";;
-by) sed -r -e "s/$2/`echo -e "\033"`[7;33m&`echo -e "\033"`[1;0m/g";;
-bm) sed -r -e "s/$2/`echo -e "\033"`[7;35m&`echo -e "\033"`[1;0m/g";;
-fo) sed -r -e "s/$2/`echo -e "\033"`[1;91m&`echo -e "\033"`[1;0m/g";;
-fb) sed -r -e "s/$2/`echo -e "\033"`[1;34m&`echo -e "\033"`[1;0m/g";;
-fc) sed -r -e "s/$2/`echo -e "\033"`[1;36m&`echo -e "\033"`[1;0m/g";;
-fg) sed -r -e "s/$2/`echo -e "\033"`[1;32m&`echo -e "\033"`[1;0m/g";;
-fr) sed -r -e "s/$2/`echo -e "\033"`[1;31m&`echo -e "\033"`[1;0m/g";;
-fy) sed -r -e "s/$2/`echo -e "\033"`[1;33m&`echo -e "\033"`[1;0m/g";;
-fm) sed -r -e "s/$2/`echo -e "\033"`[0;35m&`echo -e "\033"`[1;0m/g";;
-bb) sed -E -e "s/$2/`echo -e "\033"`[7;34m&`echo -e "\033"`[1;0m/g";;
-bc) sed -E -e "s/$2/`echo -e "\033"`[7;36m&`echo -e "\033"`[1;0m/g";;
-bg) sed -E -e "s/$2/`echo -e "\033"`[7;32m&`echo -e "\033"`[1;0m/g";;
-br) sed -E -e "s/$2/`echo -e "\033"`[7;31m&`echo -e "\033"`[1;0m/g";;
-by) sed -E -e "s/$2/`echo -e "\033"`[7;33m&`echo -e "\033"`[1;0m/g";;
-bm) sed -E -e "s/$2/`echo -e "\033"`[7;35m&`echo -e "\033"`[1;0m/g";;
-fo) sed -E -e "s/$2/`echo -e "\033"`[1;91m&`echo -e "\033"`[1;0m/g";;
-fb) sed -E -e "s/$2/`echo -e "\033"`[1;34m&`echo -e "\033"`[1;0m/g";;
-fc) sed -E -e "s/$2/`echo -e "\033"`[1;36m&`echo -e "\033"`[1;0m/g";;
-fg) sed -E -e "s/$2/`echo -e "\033"`[1;32m&`echo -e "\033"`[1;0m/g";;
-fr) sed -E -e "s/$2/`echo -e "\033"`[1;31m&`echo -e "\033"`[1;0m/g";;
-fy) sed -E -e "s/$2/`echo -e "\033"`[1;33m&`echo -e "\033"`[1;0m/g";;
-fm) sed -E -e "s/$2/`echo -e "\033"`[0;35m&`echo -e "\033"`[1;0m/g";;
* ) sed -e "s/$1/`echo -e "\033"`[7;31m&`echo -e "\033"`[1;0m/g";;
esac
}
@ -499,9 +499,9 @@ t() { @@ -499,9 +499,9 @@ t() {
return
fi
eval $sdcvc \"$*\" | sed 's/[^ ]*\.wav//g' \
eval $sdcvc \"$*\" | sed -E 's/[^ ]*\.wav//g' \
| sed 's/BrE\|NAmE/\n&/g' \
| sed '$!N; /^\(.*\)\n\1$/!P; D' \
| gsed '$!N; /^\(.*\)\n\1$/!P; D' \
| clr -fm '\[[^]]*\]' \
| clr -fy '=|~|[[:space:]]+[0-9a-zA-Zа-яА-Я]{1,2}\)|^[0-9]\.|^I+[[:space:]]' \
| clr -fo 'амер(иканизм|\.)?|\(US [^)]+\)|NAmE' \

2
etc/shell/bash/bashrc_macos

@ -3,7 +3,7 @@ PATH="$SHELLRC/bin:$SHELLRC/bin/scripts:/usr/local/opt/coreutils/libexec/gnubin/ @@ -3,7 +3,7 @@ PATH="$SHELLRC/bin:$SHELLRC/bin/scripts:/usr/local/opt/coreutils/libexec/gnubin/
# Homebrew settings
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_NO_INSECURE_REDIRECT=1
export HOMEBREW_CASK_OPTS="--require-sha"
# export HOMEBREW_CASK_OPTS="--require-sha"
# .Net settings
export DOTNET_CLI_TELEMETRY_OPTOUT=1

Loading…
Cancel
Save