aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-11-08 04:51:55 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-11-08 04:51:55 +0300
commitea6faad26ddd32a30dfe8e1fd8a65cf643901a17 (patch)
treebaff34e2f26bcb80fac17b7b3edecd028a4d2170 /%HOME%
parentadd str_replace (diff)
downloadlinux-home-ea6faad26ddd32a30dfe8e1fd8a65cf643901a17.tar.gz
linux-home-ea6faad26ddd32a30dfe8e1fd8a65cf643901a17.zip
add MinGW-w64 aliases
Diffstat (limited to '')
-rw-r--r--%HOME%/.bashrc17
1 files changed, 15 insertions, 2 deletions
diff --git a/%HOME%/.bashrc b/%HOME%/.bashrc
index 24b6618..ff4dce0 100644
--- a/%HOME%/.bashrc
+++ b/%HOME%/.bashrc
@@ -14,6 +14,12 @@ shopt -s histappend
shopt -s nullglob
shopt -s nocaseglob
+_os="$( uname -o )"
+
+is_cygwin() {
+ test "$_os" == 'Cygwin'
+}
+
alias df='df --human-readable'
alias du='du --human-readable'
@@ -27,7 +33,7 @@ alias dir='ls --format=vertical'
alias less='less --RAW-CONTROL-CHARS'
alias tree='tree -a'
-[ "$( uname -o )" == 'Cygwin' ] && alias list_packages='cygcheck -cd'
+is_cygwin && alias list_packages='cygcheck -cd'
[ -r "$HOME/.bash_utils/cxx.sh" ] && source "$HOME/.bash_utils/cxx.sh"
[ -r "$HOME/.bash_utils/distr.sh" ] && source "$HOME/.bash_utils/distr.sh"
@@ -52,4 +58,11 @@ update_ruby_settings() {
update_ruby_settings
-[ "$( uname -o )" != 'Cygwin' ] && complete -r
+is_cygwin || complete -r
+
+if is_cygwin; then
+ alias 32gcc='i686-w64-mingw32-gcc'
+ alias 32g++='i686-w64-mingw32-g++'
+ alias 64gcc='x86_64-w64-mingw32-gcc'
+ alias 64g++='x86_64-w64-mingw32-g++'
+fi