diff --git a/aliases/common.alias b/aliases/common.alias new file mode 100644 index 0000000..6156958 --- /dev/null +++ b/aliases/common.alias @@ -0,0 +1,83 @@ +# ----------------------------------------------------------------------------- +# My.Zsh - My personal zsh configuration +# Copyright (C) 2013-2020 Sameer Rahmani +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ----------------------------------------------------------------------------- + +alias p="python" + +alias r="ruby" +alias rr="rails" +alias bn="bundle" +alias be="bundle exec" +alias rs="bundle exec rails s" +alias rc="bundle exec rails c" +alias rk="bundle exec rake" + +alias em="emacs" +alias ew="emacs -nw" + +alias g="git" +alias gco="git clone" +alias gl="git pull" +alias gp="git push" +alias push="git_push" +alias pull="git_pull" +alias pu="git_push" +alias pl="git_pull" +alias gr="git restore --staged" + +alias kff="kernel_find_file" + +alias ls='ls --color -h' +alias ll='ls -lh' +alias la='ls -lhA' +alias sl=ls + +alias ...='cd ../..' +alias ....='cd ../../..' + +alias _="sudo" +alias Ps="ps aux|grep --color" + +alias kl="kill" +alias kla="killall" + +alias f="find . -iname " + + +alias m="mount " +alias um="umount " + +alias ch="chmod " +alias co="chown " + +alias d="docker" +alias d-="docker-compose" +alias dall="docker ps -a -q" +alias drm='d stop `dall`;d rm `dall`' +alias drmi='docker_remove_orphan_layers' + +alias n="npm" +alias nr="npm run" +alias y="yarn" +alias yi="yarn add" +alias yr="yarn run" + +alias reload="source ~/.zshrc" +alias l="lein" +alias copy="xclip -sel clip <" +alias t="terraform" diff --git a/aliases/debian.alias b/aliases/debian.alias new file mode 100644 index 0000000..baafbcd --- /dev/null +++ b/aliases/debian.alias @@ -0,0 +1,31 @@ +# ----------------------------------------------------------------------------- +# My.Zsh - My personal zsh configuration +# Copyright (C) 2013-2020 Sameer Rahmani +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ----------------------------------------------------------------------------- + +alias ag="apt-get" +alias agu="apt-get update" +alias agi="apt-get install " +alias agr="apt-get remove " +alias agp="apt-get purge " +alias agd="apt-get dist-upgrade" +alias ags="apt-cache search " +alias agc="apt-cache " +alias aps="aptitude search " +alias a="apt" +alias ai="apt install" +alias au="apt update" diff --git a/aliases b/aliases/debian.alias~ similarity index 99% rename from aliases rename to aliases/debian.alias~ index b83ce37..64d9f97 100644 --- a/aliases +++ b/aliases/debian.alias~ @@ -17,6 +17,9 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # ----------------------------------------------------------------------------- + + +source alias p="python2.7" alias p3="python3.3" alias ac=". env/bin/activate" diff --git a/aliases/gentoo.alias b/aliases/gentoo.alias new file mode 100644 index 0000000..1d7a04f --- /dev/null +++ b/aliases/gentoo.alias @@ -0,0 +1,24 @@ +# ----------------------------------------------------------------------------- +# My.Zsh - My personal zsh configuration +# Copyright (C) 2013-2020 Sameer Rahmani +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ----------------------------------------------------------------------------- + +alias e="emerge" +alias ea="emerge -a" +alias es="emerge --search" +alias esy="emerge --sync" +alias eu="ea -uDU --changed-use --deep @world" diff --git a/aliases/gentoo.alias~ b/aliases/gentoo.alias~ new file mode 100644 index 0000000..e61c733 --- /dev/null +++ b/aliases/gentoo.alias~ @@ -0,0 +1,22 @@ +# ----------------------------------------------------------------------------- +# My.Zsh - My personal zsh configuration +# Copyright (C) 2013-2020 Sameer Rahmani +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ----------------------------------------------------------------------------- + +alias e="emerge" +alias ea="emerge -a" +alias es="emerge --search" diff --git a/aliases/mac.alias b/aliases/mac.alias new file mode 100644 index 0000000..c5b3a2e --- /dev/null +++ b/aliases/mac.alias @@ -0,0 +1,20 @@ +# ----------------------------------------------------------------------------- +# My.Zsh - My personal zsh configuration +# Copyright (C) 2013-2020 Sameer Rahmani +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# ----------------------------------------------------------------------------- + +alias b="brew" diff --git a/my.zsh b/my.zsh index deec22b..0cb70b9 100644 --- a/my.zsh +++ b/my.zsh @@ -47,7 +47,8 @@ for lib ($myzsh/lib/*.zsh); do done # Load aliases -. $myzsh/aliases +. $myzsh/aliases/common.alias +. $myzsh/aliases/$SYSTEM_TYPE.alias . $myzsh/plugins/git-prompt-plugin/git-prompt-plugin.zsh # Load the theme and coloring diff --git a/zshrc.sample b/zshrc.sample index 3e95445..4cb421b 100644 --- a/zshrc.sample +++ b/zshrc.sample @@ -1,5 +1,9 @@ export MYZSH=$HOME/.my.zsh THEME=$MYZSH/themes/lxsameer.zsh-theme + +# Choose the system type you want: options are gentoo, debian, mac +export SYSTEM_TYPE="gentoo" + source $MYZSH/my.zsh PROJECTS=$HOME/src/