From 8f67a737b12a24c8600dc88a187fc13b77e955ec Mon Sep 17 00:00:00 2001 From: mj Date: Sun, 8 Mar 2015 12:44:40 +0100 Subject: [PATCH] MOVE template files: filename -> filename.sh --- templates/bash_aliases | 48 ----------------- templates/bash_aliases.sh | 48 +++++++++++++++++ templates/bashrc | 107 ------------------------------------ templates/bashrc.sh | 107 ++++++++++++++++++++++++++++++++++++ templates/zshrc | 135 ---------------------------------------------- templates/zshrc.sh | 135 ++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 290 insertions(+), 290 deletions(-) delete mode 100644 templates/bash_aliases create mode 100644 templates/bash_aliases.sh delete mode 100644 templates/bashrc create mode 100644 templates/bashrc.sh delete mode 100644 templates/zshrc create mode 100644 templates/zshrc.sh diff --git a/templates/bash_aliases b/templates/bash_aliases deleted file mode 100644 index cf17cee..0000000 --- a/templates/bash_aliases +++ /dev/null @@ -1,48 +0,0 @@ -# nav: -alias ..="cd ../" -alias ...="cd ../../" -alias ....="cd ../../../" -alias .....="cd ../../../../" - -alias ch="cat /etc/hosts" -alias lh="less /etc/hosts" -alias nh="sudo nano /etc/hosts" - -alias na="nano ~/.bash_aliases" -alias nz="nano ~/.zshrc" - -alias c="cat" - -# docker: -alias docker="sudo docker" - -alias de="sudo docker execute" -alias di="sudo docker inspect" -alias dim="sudo docker images" -alias dl="sudo docker logs -f" -alias dr="sudo docker rm" -alias dri="sudo docker rmi" -alias ds="sudo docker stop" -alias dsta="sudo docker start" -alias dps="sudo docker ps" -alias fig="sudo fig" - -export LS_OPTIONS='--color=always' -alias ll="ls $LS_OPTIONS -Alh" -alias l="ls $LS_OPTIONS -lh" - -# misc: -alias e="exit" -alias mkp="makepasswd --chars" -alias n="nano" -alias p="python" -alias ports="netstat -tulanp" - -# OpenVZ: -alias vl="vzlist" -alias ve="vzctl enter" - -# fix common_aliases (zsh): -alias rm='rm' -alias cp='cp' -alias mv='mv' \ No newline at end of file diff --git a/templates/bash_aliases.sh b/templates/bash_aliases.sh new file mode 100644 index 0000000..cf17cee --- /dev/null +++ b/templates/bash_aliases.sh @@ -0,0 +1,48 @@ +# nav: +alias ..="cd ../" +alias ...="cd ../../" +alias ....="cd ../../../" +alias .....="cd ../../../../" + +alias ch="cat /etc/hosts" +alias lh="less /etc/hosts" +alias nh="sudo nano /etc/hosts" + +alias na="nano ~/.bash_aliases" +alias nz="nano ~/.zshrc" + +alias c="cat" + +# docker: +alias docker="sudo docker" + +alias de="sudo docker execute" +alias di="sudo docker inspect" +alias dim="sudo docker images" +alias dl="sudo docker logs -f" +alias dr="sudo docker rm" +alias dri="sudo docker rmi" +alias ds="sudo docker stop" +alias dsta="sudo docker start" +alias dps="sudo docker ps" +alias fig="sudo fig" + +export LS_OPTIONS='--color=always' +alias ll="ls $LS_OPTIONS -Alh" +alias l="ls $LS_OPTIONS -lh" + +# misc: +alias e="exit" +alias mkp="makepasswd --chars" +alias n="nano" +alias p="python" +alias ports="netstat -tulanp" + +# OpenVZ: +alias vl="vzlist" +alias ve="vzctl enter" + +# fix common_aliases (zsh): +alias rm='rm' +alias cp='cp' +alias mv='mv' \ No newline at end of file diff --git a/templates/bashrc b/templates/bashrc deleted file mode 100644 index c74c26a..0000000 --- a/templates/bashrc +++ /dev/null @@ -1,107 +0,0 @@ -# If not running interactively, don't do anything -case $- in - *i*) ;; - *) return;; -esac - -######################## -# ******************** # -# * * # -# * COMPLETION * # -# * * # -# ******************** # -######################## - -# enable bash completion in interactive shells -if [ -f /etc/bash_completion ]; then - . /etc/bash_completion -fi - -# if the command-not-found package is installed, use it -if [ -x /usr/lib/command-not-found ]; then - function command_not_found_handle { - # check because c-n-f could've been removed in the meantime - if [ -x /usr/lib/command-not-found ]; then - /usr/bin/python /usr/lib/command-not-found -- $1 - return $? - else - return 127 - fi - } -fi - -######################## -# ******************** # -# * * # -# * HISTORY * # -# * * # -# ******************** # -######################## - -# Eternal bash history. -# --------------------- -export HISTFILESIZE= -export HISTSIZE= -export HISTTIMEFORMAT="[%F %T] " -# Change the file location -export HISTFILE=~/.history -# Force prompt to write history after every command -PROMPT_COMMAND="history -a; $PROMPT_COMMAND" - - -# check the window size after each command -shopt -s checkwinsize - -# If set, the pattern "**" used in a pathname expansion context will -# match all files and zero or more directories and subdirectories. -#shopt -s globstar - -# set variable identifying the chroot you work in (used in the prompt below) -if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then - debian_chroot=$(cat /etc/debian_chroot) -fi - -# set a fancy prompt -case "$TERM" in - xterm-color) color_prompt=yes;; -esac - -# colored prompt -force_color_prompt=yes - -if [ -n "$force_color_prompt" ]; then - if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then - # We have color support; assume it's compliant with Ecma-48 - # (ISO/IEC-6429). (Lack of such support is extremely rare, and such - # a case would tend to support setf rather than setaf.) - color_prompt=yes - else - color_prompt= - fi -fi - -if [ "$color_prompt" = yes ]; then - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' -else - PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' -fi -#unset color_prompt force_color_prompt - -# enable color support of ls and also add handy aliases -if [ -x /usr/bin/dircolors ]; then - test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" - alias ls='ls --color=auto' - alias dir='dir --color=auto' - alias vdir='vdir --color=auto' - - alias grep='grep --color=auto' - alias fgrep='fgrep --color=auto' - alias egrep='egrep --color=auto' -fi - - -# Alias definitions - -if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases -fi diff --git a/templates/bashrc.sh b/templates/bashrc.sh new file mode 100644 index 0000000..c74c26a --- /dev/null +++ b/templates/bashrc.sh @@ -0,0 +1,107 @@ +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +######################## +# ******************** # +# * * # +# * COMPLETION * # +# * * # +# ******************** # +######################## + +# enable bash completion in interactive shells +if [ -f /etc/bash_completion ]; then + . /etc/bash_completion +fi + +# if the command-not-found package is installed, use it +if [ -x /usr/lib/command-not-found ]; then + function command_not_found_handle { + # check because c-n-f could've been removed in the meantime + if [ -x /usr/lib/command-not-found ]; then + /usr/bin/python /usr/lib/command-not-found -- $1 + return $? + else + return 127 + fi + } +fi + +######################## +# ******************** # +# * * # +# * HISTORY * # +# * * # +# ******************** # +######################## + +# Eternal bash history. +# --------------------- +export HISTFILESIZE= +export HISTSIZE= +export HISTTIMEFORMAT="[%F %T] " +# Change the file location +export HISTFILE=~/.history +# Force prompt to write history after every command +PROMPT_COMMAND="history -a; $PROMPT_COMMAND" + + +# check the window size after each command +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt +case "$TERM" in + xterm-color) color_prompt=yes;; +esac + +# colored prompt +force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +#unset color_prompt force_color_prompt + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + alias dir='dir --color=auto' + alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + + +# Alias definitions + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi diff --git a/templates/zshrc b/templates/zshrc deleted file mode 100644 index dbb83ca..0000000 --- a/templates/zshrc +++ /dev/null @@ -1,135 +0,0 @@ -# ENVIRONMENT: -export GJ_DEVENV=local_aptproxy - -export ZCFG=~/.config/zsh-config -# Path to your oh-my-zsh installation. -export ZSH=$ZCFG/tools/oh-my-zsh - -# Set name of the theme to load. -# Look in ~/.oh-my-zsh/themes/ -# Optionally, if you set this to "random", it'll load a random theme each -# time that oh-my-zsh is loaded. -ZSH_THEME="wedisagree" - -# Uncomment the following line to use case-sensitive completion. -CASE_SENSITIVE="true" - -# Uncomment the following line to disable bi-weekly auto-update checks. -# DISABLE_AUTO_UPDATE="true" - -# Uncomment the following line to change how often to auto-update (in days). -# export UPDATE_ZSH_DAYS=13 - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" - -# Uncomment the following line to display red dots whilst waiting for completion. -COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -HIST_STAMPS="dd.mm.yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# z: -# export _Z_DATA="$HOME/.config/.z" - -# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) -# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. -# plugins=(git) - -# User configuration - -export PATH=$HOME/bin:/usr/local/bin:$PATH -# export MANPATH="/usr/local/man:$MANPATH" - -source $ZSH/oh-my-zsh.sh - -# You may need to manually set your language environment -export LANG=en_US.UTF-8 - -# -# ANTIGEN: -# -source $ZCFG/tools/antigen/antigen.zsh - -# MUST: -antigen bundle command-not-found -antigen bundle common-aliases -antigen bundle debian -antigen bundle dirhistory -antigen bundle extract -antigen bundle git -antigen bundle history -antigen bundle history-substring-search -antigen bundle systemadmin -antigen bundle zsh_reload -# /MUST - -# NICE: -#antigen bundle iwhois -#antigen bundle screen -#antigen bundle ssh-agent -#antigen bundle web-search -# # if webdev: -#antigen bundle catimg - -# docker: -#antigen bundle docker - -# python: -#antigen bundle pip -#antigen bundle python -#antigen bundle virtualenv -#antigen bundle virtualenvwrapper - -# kde: -#antigen bundle kate - - -# removed: -#antigen bundle autoenv -#antigen bundle iwhois -#antigen bundle per-directory-history -#antigen bundle screen - -# -# THEME #---------- -# -antigen theme muse - -antigen apply - -# ssh -# export SSH_KEY_PATH="~/.ssh/id_rsa" -# zstyle :omz:plugins:ssh-agent agent-forwarding on - -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases -fi diff --git a/templates/zshrc.sh b/templates/zshrc.sh new file mode 100644 index 0000000..dbb83ca --- /dev/null +++ b/templates/zshrc.sh @@ -0,0 +1,135 @@ +# ENVIRONMENT: +export GJ_DEVENV=local_aptproxy + +export ZCFG=~/.config/zsh-config +# Path to your oh-my-zsh installation. +export ZSH=$ZCFG/tools/oh-my-zsh + +# Set name of the theme to load. +# Look in ~/.oh-my-zsh/themes/ +# Optionally, if you set this to "random", it'll load a random theme each +# time that oh-my-zsh is loaded. +ZSH_THEME="wedisagree" + +# Uncomment the following line to use case-sensitive completion. +CASE_SENSITIVE="true" + +# Uncomment the following line to disable bi-weekly auto-update checks. +# DISABLE_AUTO_UPDATE="true" + +# Uncomment the following line to change how often to auto-update (in days). +# export UPDATE_ZSH_DAYS=13 + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +HIST_STAMPS="dd.mm.yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# z: +# export _Z_DATA="$HOME/.config/.z" + +# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) +# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +# plugins=(git) + +# User configuration + +export PATH=$HOME/bin:/usr/local/bin:$PATH +# export MANPATH="/usr/local/man:$MANPATH" + +source $ZSH/oh-my-zsh.sh + +# You may need to manually set your language environment +export LANG=en_US.UTF-8 + +# +# ANTIGEN: +# +source $ZCFG/tools/antigen/antigen.zsh + +# MUST: +antigen bundle command-not-found +antigen bundle common-aliases +antigen bundle debian +antigen bundle dirhistory +antigen bundle extract +antigen bundle git +antigen bundle history +antigen bundle history-substring-search +antigen bundle systemadmin +antigen bundle zsh_reload +# /MUST + +# NICE: +#antigen bundle iwhois +#antigen bundle screen +#antigen bundle ssh-agent +#antigen bundle web-search +# # if webdev: +#antigen bundle catimg + +# docker: +#antigen bundle docker + +# python: +#antigen bundle pip +#antigen bundle python +#antigen bundle virtualenv +#antigen bundle virtualenvwrapper + +# kde: +#antigen bundle kate + + +# removed: +#antigen bundle autoenv +#antigen bundle iwhois +#antigen bundle per-directory-history +#antigen bundle screen + +# +# THEME #---------- +# +antigen theme muse + +antigen apply + +# ssh +# export SSH_KEY_PATH="~/.ssh/id_rsa" +# zstyle :omz:plugins:ssh-agent agent-forwarding on + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi -- 2.0.0