Commit 4edb0165015335f39755c987d1751463c381c952

Authored by mj
Exists in master and in 2 other branches 02-merge, dev

conflict

Showing 6 changed files Side-by-side Diff

templates/bash_aliases.sh
... ... @@ -0,0 +1,47 @@
  1 +# nav:
  2 +alias ..="cd ../"
  3 +alias ...="cd ../../"
  4 +alias ....="cd ../../../"
  5 +alias .....="cd ../../../../"
  6 +
  7 +alias ch="cat /etc/hosts"
  8 +alias lh="less /etc/hosts"
  9 +alias nh="sudo nano /etc/hosts"
  10 +
  11 +alias na="nano ~/.bash_aliases"
  12 +alias nz="nano ~/.zshrc"
  13 +
  14 +alias c="cat"
  15 +
  16 +# docker:
  17 +alias docker="sudo docker"
  18 +alias de="sudo docker execute"
  19 +alias di="sudo docker inspect"
  20 +alias dim="sudo docker images"
  21 +alias dl="sudo docker logs -f"
  22 +alias dr="sudo docker rm"
  23 +alias dri="sudo docker rmi"
  24 +alias ds="sudo docker stop"
  25 +alias dsta="sudo docker start"
  26 +alias dps="sudo docker ps"
  27 +alias fig="sudo fig"
  28 +
  29 +# misc:
  30 +alias e="exit"
  31 +alias makepasswd="makepasswd --chars=8"
  32 +alias mkp="makepasswd --chars"
  33 +alias n="nano"
  34 +alias p="python"
  35 +alias ports="netstat -tulanp"
  36 +
  37 +alias tt="touch"
  38 +
  39 +# OpenVZ:
  40 +alias vl="vzlist"
  41 +alias ve="vzctl enter"
  42 +
  43 +# fix common_aliases:
  44 +alias ll="ls -Alh"
  45 +alias rm='rm'
  46 +alias cp='cp'
  47 +alias mv='mv'
... ... @@ -0,0 +1,107 @@
  1 +# If not running interactively, don't do anything
  2 +case $- in
  3 + *i*) ;;
  4 + *) return;;
  5 +esac
  6 +
  7 +########################
  8 +# ******************** #
  9 +# * * #
  10 +# * COMPLETION * #
  11 +# * * #
  12 +# ******************** #
  13 +########################
  14 +
  15 +# enable bash completion in interactive shells
  16 +if [ -f /etc/bash_completion ]; then
  17 + . /etc/bash_completion
  18 +fi
  19 +
  20 +# if the command-not-found package is installed, use it
  21 +if [ -x /usr/lib/command-not-found ]; then
  22 + function command_not_found_handle {
  23 + # check because c-n-f could've been removed in the meantime
  24 + if [ -x /usr/lib/command-not-found ]; then
  25 + /usr/bin/python /usr/lib/command-not-found -- $1
  26 + return $?
  27 + else
  28 + return 127
  29 + fi
  30 + }
  31 +fi
  32 +
  33 +########################
  34 +# ******************** #
  35 +# * * #
  36 +# * HISTORY * #
  37 +# * * #
  38 +# ******************** #
  39 +########################
  40 +
  41 +# Eternal bash history.
  42 +# ---------------------
  43 +export HISTFILESIZE=
  44 +export HISTSIZE=
  45 +export HISTTIMEFORMAT="[%F %T] "
  46 +# Change the file location
  47 +export HISTFILE=~/.history
  48 +# Force prompt to write history after every command
  49 +PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
  50 +
  51 +
  52 +# check the window size after each command
  53 +shopt -s checkwinsize
  54 +
  55 +# If set, the pattern "**" used in a pathname expansion context will
  56 +# match all files and zero or more directories and subdirectories.
  57 +#shopt -s globstar
  58 +
  59 +# set variable identifying the chroot you work in (used in the prompt below)
  60 +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
  61 + debian_chroot=$(cat /etc/debian_chroot)
  62 +fi
  63 +
  64 +# set a fancy prompt
  65 +case "$TERM" in
  66 + xterm-color) color_prompt=yes;;
  67 +esac
  68 +
  69 +# colored prompt
  70 +force_color_prompt=yes
  71 +
  72 +if [ -n "$force_color_prompt" ]; then
  73 + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
  74 + # We have color support; assume it's compliant with Ecma-48
  75 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
  76 + # a case would tend to support setf rather than setaf.)
  77 + color_prompt=yes
  78 + else
  79 + color_prompt=
  80 + fi
  81 +fi
  82 +
  83 +if [ "$color_prompt" = yes ]; then
  84 + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  85 +else
  86 + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  87 +fi
  88 +#unset color_prompt force_color_prompt
  89 +
  90 +# enable color support of ls and also add handy aliases
  91 +if [ -x /usr/bin/dircolors ]; then
  92 + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  93 + alias ls='ls --color=auto'
  94 + alias dir='dir --color=auto'
  95 + alias vdir='vdir --color=auto'
  96 +
  97 + alias grep='grep --color=auto'
  98 + alias fgrep='fgrep --color=auto'
  99 + alias egrep='egrep --color=auto'
  100 +fi
  101 +
  102 +
  103 +# Alias definitions
  104 +
  105 +if [ -f ~/.bash_aliases ]; then
  106 + . ~/.bash_aliases
  107 +fi
... ... @@ -0,0 +1,135 @@
  1 +# ENVIRONMENT:
  2 +export GJ_DEVENV=local_aptproxy
  3 +
  4 +export ZCFG=~/.config/zsh-config
  5 +# Path to your oh-my-zsh installation.
  6 +export ZSH=$ZCFG/tools/oh-my-zsh
  7 +
  8 +# Set name of the theme to load.
  9 +# Look in ~/.oh-my-zsh/themes/
  10 +# Optionally, if you set this to "random", it'll load a random theme each
  11 +# time that oh-my-zsh is loaded.
  12 +ZSH_THEME="wedisagree"
  13 +
  14 +# Uncomment the following line to use case-sensitive completion.
  15 +CASE_SENSITIVE="true"
  16 +
  17 +# Uncomment the following line to disable bi-weekly auto-update checks.
  18 +# DISABLE_AUTO_UPDATE="true"
  19 +
  20 +# Uncomment the following line to change how often to auto-update (in days).
  21 +# export UPDATE_ZSH_DAYS=13
  22 +
  23 +# Uncomment the following line to disable colors in ls.
  24 +# DISABLE_LS_COLORS="true"
  25 +
  26 +# Uncomment the following line to disable auto-setting terminal title.
  27 +# DISABLE_AUTO_TITLE="true"
  28 +
  29 +# Uncomment the following line to enable command auto-correction.
  30 +# ENABLE_CORRECTION="true"
  31 +
  32 +# Uncomment the following line to display red dots whilst waiting for completion.
  33 +COMPLETION_WAITING_DOTS="true"
  34 +
  35 +# Uncomment the following line if you want to disable marking untracked files
  36 +# under VCS as dirty. This makes repository status check for large repositories
  37 +# much, much faster.
  38 +DISABLE_UNTRACKED_FILES_DIRTY="true"
  39 +
  40 +# Uncomment the following line if you want to change the command execution time
  41 +# stamp shown in the history command output.
  42 +# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  43 +HIST_STAMPS="dd.mm.yyyy"
  44 +
  45 +# Would you like to use another custom folder than $ZSH/custom?
  46 +# ZSH_CUSTOM=/path/to/new-custom-folder
  47 +
  48 +# z:
  49 +# export _Z_DATA="$HOME/.config/.z"
  50 +
  51 +# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
  52 +# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
  53 +# Example format: plugins=(rails git textmate ruby lighthouse)
  54 +# Add wisely, as too many plugins slow down shell startup.
  55 +# plugins=(git)
  56 +
  57 +# User configuration
  58 +
  59 +export PATH=$HOME/bin:/usr/local/bin:$PATH
  60 +# export MANPATH="/usr/local/man:$MANPATH"
  61 +
  62 +source $ZSH/oh-my-zsh.sh
  63 +
  64 +# You may need to manually set your language environment
  65 +export LANG=en_US.UTF-8
  66 +
  67 +#
  68 +# ANTIGEN:
  69 +#
  70 +source $ZCFG/tools/antigen/antigen.zsh
  71 +
  72 +# MUST:
  73 +antigen bundle command-not-found
  74 +antigen bundle common-aliases
  75 +antigen bundle debian
  76 +antigen bundle dirhistory
  77 +antigen bundle extract
  78 +antigen bundle git
  79 +antigen bundle history
  80 +antigen bundle history-substring-search
  81 +antigen bundle systemadmin
  82 +antigen bundle zsh_reload
  83 +# /MUST
  84 +
  85 +# NICE:
  86 +#antigen bundle iwhois
  87 +#antigen bundle screen
  88 +#antigen bundle ssh-agent
  89 +#antigen bundle web-search
  90 +# # if webdev:
  91 +#antigen bundle catimg
  92 +
  93 +# docker:
  94 +#antigen bundle docker
  95 +
  96 +# python:
  97 +#antigen bundle pip
  98 +#antigen bundle python
  99 +#antigen bundle virtualenv
  100 +#antigen bundle virtualenvwrapper
  101 +
  102 +# kde:
  103 +#antigen bundle kate
  104 +
  105 +
  106 +# removed:
  107 +#antigen bundle autoenv
  108 +#antigen bundle iwhois
  109 +#antigen bundle per-directory-history
  110 +#antigen bundle screen
  111 +
  112 +#
  113 +# THEME #----------
  114 +#
  115 +antigen theme muse
  116 +
  117 +antigen apply
  118 +
  119 +# ssh
  120 +# export SSH_KEY_PATH="~/.ssh/id_rsa"
  121 +# zstyle :omz:plugins:ssh-agent agent-forwarding on
  122 +
  123 +# Preferred editor for local and remote sessions
  124 +# if [[ -n $SSH_CONNECTION ]]; then
  125 +# export EDITOR='vim'
  126 +# else
  127 +# export EDITOR='mvim'
  128 +# fi
  129 +
  130 +# Compilation flags
  131 +# export ARCHFLAGS="-arch x86_64"
  132 +
  133 +if [ -f ~/.bash_aliases ]; then
  134 + . ~/.bash_aliases
  135 +fi