introduce a basic environment config
This commit is contained in:
parent
d562581685
commit
c76bb68114
4 changed files with 25 additions and 48 deletions
|
@ -6,11 +6,9 @@
|
|||
|
||||
export EDITOR="vim"
|
||||
alias vi="vim"
|
||||
alias aedit=" $EDITOR ~/.zsh/aliases.zsh; source ~/.zsh/aliases.zsh"
|
||||
alias fedit=" $EDITOR ~/.zsh/functions.zsh; source ~/.zsh/functions.zsh"
|
||||
alias pedit=" $EDITOR ~/.zsh/private.zsh; source ~/.zsh/private.zsh"
|
||||
alias vedit=" $EDITOR /etc/httpd/conf/extra/httpd-vhosts.conf"
|
||||
alias gedit=" $EDITOR ~/.gitconfig"
|
||||
alias aedit=" $EDITOR $ZSH_CONFG/aliases.zsh; source $ZSH_CONFIG/aliases.zsh"
|
||||
alias fedit=" $EDITOR $ZSH_CONFG/functions.zsh; source $ZSH_CONFIG/functions.zsh"
|
||||
alias pedit=" $EDITOR $ZSH_CONFIG/private.zsh; source $ZSH_CONFIG/private.zsh"
|
||||
|
||||
#alias man="unset PAGER; man"
|
||||
alias grep='grep --color=auto'
|
||||
|
@ -33,7 +31,6 @@ alias g='git'
|
|||
alias d=' dirs -v'
|
||||
alias ka="killall"
|
||||
|
||||
#alias .='open .'
|
||||
alias cd=' cd'
|
||||
alias ..=' cd ..; ls'
|
||||
alias ...=' cd ..; cd ..; ls'
|
||||
|
|
36
colors.zsh
36
colors.zsh
|
@ -1,36 +0,0 @@
|
|||
#! /bin/zsh
|
||||
# A script to make using 256 colors in zsh less painful.
|
||||
# P.C. Shyamshankar <sykora@lucentbeing.com>
|
||||
# Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/
|
||||
|
||||
typeset -Ag FX FG BG
|
||||
|
||||
FX=(
|
||||
reset "%{[00m%}"
|
||||
bold "%{[01m%}" no-bold "%{[22m%}"
|
||||
italic "%{[03m%}" no-italic "%{[23m%}"
|
||||
underline "%{[04m%}" no-underline "%{[24m%}"
|
||||
blink "%{[05m%}" no-blink "%{[25m%}"
|
||||
reverse "%{[07m%}" no-reverse "%{[27m%}"
|
||||
)
|
||||
|
||||
for color in {000..255}; do
|
||||
FG[$color]="%{[38;5;${color}m%}"
|
||||
BG[$color]="%{[48;5;${color}m%}"
|
||||
done
|
||||
|
||||
|
||||
# See if we can use colors.
|
||||
# Original from Phil Gold at http://aperiodic.net/phil/prompt/
|
||||
autoload colors zsh/terminfo
|
||||
if [[ "$terminfo[colors]" -ge 8 ]]; then
|
||||
colors
|
||||
fi
|
||||
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
|
||||
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
|
||||
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
|
||||
(( count = $count + 1 ))
|
||||
done
|
||||
PR_NO_COLOR="%{$terminfo[sgr0]%}"
|
||||
|
||||
|
17
environment.zsh
Normal file
17
environment.zsh
Normal file
|
@ -0,0 +1,17 @@
|
|||
# @author Sebastian Tramp <mail@sebastian.tramp.name>
|
||||
# @license http://opensource.org/licenses/gpl-license.php
|
||||
#
|
||||
# Basic environment settings related to the zsh compiliation (not private)
|
||||
|
||||
# XDG Base Directory Specification
|
||||
# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export ZSH_CONFIG="$XDG_CONFIG_HOME/zsh"
|
||||
export ZSH_CACHE="$XDG_CACHE_HOME/zsh"
|
||||
mkdir -p $ZSH_CACHE
|
||||
|
||||
# executable search path
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
|
||||
|
11
zshrc
11
zshrc
|
@ -4,13 +4,11 @@
|
|||
# the main RC file (will be linked to ~/.zshrc)
|
||||
#
|
||||
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export ZSH_CONFIG="$XDG_CONFIG_HOME/zsh"
|
||||
export ZSH_CACHE="$XDG_CACHE_HOME/zsh"
|
||||
mkdir -p $ZSH_CACHE
|
||||
# first include of the environment
|
||||
source $HOME/.config/zsh/environment.zsh
|
||||
|
||||
typeset -ga sources
|
||||
sources+="$ZSH_CONFIG/environment.zsh"
|
||||
sources+="$ZSH_CONFIG/options.zsh"
|
||||
sources+="$ZSH_CONFIG/prompt.zsh"
|
||||
sources+="$ZSH_CONFIG/functions.zsh"
|
||||
|
@ -32,9 +30,10 @@ sources+="$ZSH_CONFIG/autojump/autojump.zsh"
|
|||
systemFile=`uname -s | tr "[:upper:]" "[:lower:]"`
|
||||
sources+="$ZSH_CONFIG/$systemFile.zsh"
|
||||
|
||||
# Finally include the private.zsh file
|
||||
# Private aliases and adoptions
|
||||
sources+="$ZSH_CONFIG/private.zsh"
|
||||
|
||||
# completion config needs to be after system and private config
|
||||
sources+="$ZSH_CONFIG/completion.zsh"
|
||||
|
||||
# try to include all sources
|
||||
|
|
Loading…
Reference in a new issue