commonshrc.
This commit is contained in:
parent
6f156b6629
commit
69652531e3
@ -1,5 +1,5 @@
|
||||
FILES = ratpoisonrc vimrc Xresources zshrc $(wildcard zfuncs/*) emacs.el \
|
||||
bashrc bash_completion screenrc
|
||||
bashrc bash_completion screenrc commonshrc
|
||||
|
||||
ifeq "$(USER)" "gebner"
|
||||
FILES += muttrc gnus.el ssh/config
|
||||
|
17
conf/bashrc
17
conf/bashrc
@ -1,16 +1,6 @@
|
||||
# Copyright (C) 2004 Gabriel Ebner
|
||||
|
||||
. /etc/profile
|
||||
|
||||
MYPREFIX=$HOME/build/myprefix
|
||||
export USER=`whoami`
|
||||
export PATH=$MYPREFIX/bin:$PATH
|
||||
export LD_LIBRARY_PATH=$MYPREFIX/lib64:$MYPREFIX/lib:$LD_LIBRARY_PATH
|
||||
export MANPATH=$MYPREFIX/man:$MANPATH
|
||||
export PKG_CONFIG_PATH=$MYPREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
export PYTHONPATH=$MYPREFIX/lib/python2.4/site-packages:$PYTHONPATH
|
||||
export R_LIBS=$MYPREFIX/lib/R
|
||||
export RUBYLIB=$MYPREFIX/lib/ruby/site_ruby/1.8/
|
||||
. ~/.commonshrc
|
||||
|
||||
if [[ $- != *i* ]]; then
|
||||
# Shell is non-interactive. Be done now
|
||||
@ -23,11 +13,6 @@ HISTSIZE=10000
|
||||
|
||||
PS1='\u@\h:\w\$ '
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
alias qemu='qemu -cirrusvga -user-net'
|
||||
export EMAIL='Gabriel Ebner <ge@gabrielebner.at>'
|
||||
test -x /usr/bin/lesspipe && eval `lesspipe`
|
||||
|
||||
# Bash completion
|
||||
for i in /etc/profile.d/bash-completion /etc/bash_completion; do
|
||||
test -f $i && . $i && break
|
||||
|
60
conf/commonshrc
Normal file
60
conf/commonshrc
Normal file
@ -0,0 +1,60 @@
|
||||
# Copyright (C) 2011 Gabriel Ebner
|
||||
# vim:fdm=marker ft=sh:
|
||||
|
||||
. /etc/profile
|
||||
export USER=`whoami`
|
||||
|
||||
# $MYPREFIX {{{1
|
||||
|
||||
add_to() {
|
||||
if [ -n "`eval echo \$\{$1\}`" ]; then
|
||||
export $1="$2:`eval echo \$\{$1\}`"
|
||||
else
|
||||
export $1="$2"
|
||||
fi
|
||||
}
|
||||
|
||||
add_myprefix_to() {
|
||||
add_to "$1" "$MYPREFIX/$2"
|
||||
}
|
||||
|
||||
MYPREFIX=~/build/myprefix
|
||||
|
||||
add_myprefix_to PATH bin
|
||||
add_myprefix_to PATH sbin
|
||||
|
||||
add_to PATH /sbin
|
||||
add_to PATH /usr/sbin
|
||||
add_to PATH /usr/local/sbin
|
||||
|
||||
add_to PATH ~/.cabal/bin
|
||||
|
||||
add_myprefix_to LD_LIBRARY_PATH lib
|
||||
add_myprefix_to LD_LIBRARY_PATH lib64
|
||||
|
||||
add_myprefix_to MANPATH man
|
||||
|
||||
add_myprefix_to PKG_CONFIG_PATH lib/pkgconfig
|
||||
|
||||
add_myprefix_to PYTHONPATH lib/python2.6/site-packages
|
||||
add_myprefix_to PYTHONPATH lib/python/site-packages
|
||||
add_myprefix_to PYTHONPATH lib/python
|
||||
|
||||
add_myprefix_to RUBYLIB lib/ruby/site_ruby/1.8
|
||||
|
||||
if [ -x /usr/bin/perl ]; then
|
||||
add_myprefix_to PERL5LIB lib/perl/`perl -e 'printf"%vd\n",$^V'`
|
||||
add_myprefix_to PERL5LIB share/perl/`perl -e 'printf"%vd\n",$^V'`
|
||||
fi
|
||||
|
||||
add_myprefix_to R_LIBS lib/R:/usr/lib/R/site-library
|
||||
|
||||
add_to PATH ~/build/android-sdk-linux_86/platform-tools:~/build/android-sdk-linux_86/tools
|
||||
|
||||
# Customisation of Programs {{{1
|
||||
alias ls='ls --color=auto'
|
||||
export EMAIL='Gabriel Ebner <ge@gabrielebner.at>'
|
||||
test -x /usr/bin/lesspipe && eval `lesspipe`
|
||||
test -x /usr/bin/vim && export EDITOR=/usr/bin/vim
|
||||
|
||||
export MPD_HOST=127.0.0.1 MPD_PORT=6600
|
41
conf/zshrc
41
conf/zshrc
@ -1,40 +1,9 @@
|
||||
# Copyright (C) 2004 Gabriel Ebner
|
||||
# vim:fdm=marker:
|
||||
|
||||
. /etc/profile
|
||||
export USER=$USERNAME
|
||||
. ~/.commonshrc
|
||||
fpath=(~/.zfuncs $fpath)
|
||||
|
||||
# $MYPREFIX {{{1
|
||||
|
||||
add_to() {
|
||||
if [[ `eval echo \$\{\+$1\}` == 1 ]]; then
|
||||
export $1=$2:`eval echo \$\{$1\}`
|
||||
else
|
||||
export $1=$2
|
||||
fi
|
||||
}
|
||||
|
||||
add_myprefix_to() {
|
||||
add_to "$1" "$MYPREFIX/$2"
|
||||
}
|
||||
|
||||
MYPREFIX=~/build/myprefix
|
||||
add_myprefix_to PATH bin
|
||||
add_myprefix_to PATH sbin
|
||||
add_to PATH ~/.cabal/bin
|
||||
add_myprefix_to LD_LIBRARY_PATH lib
|
||||
add_myprefix_to LD_LIBRARY_PATH lib64
|
||||
add_myprefix_to MANPATH man
|
||||
add_myprefix_to PKG_CONFIG_PATH lib/pkgconfig
|
||||
add_myprefix_to PYTHONPATH lib/python2.6/site-packages
|
||||
add_myprefix_to PYTHONPATH lib/python/site-packages
|
||||
add_myprefix_to PYTHONPATH lib/python
|
||||
add_myprefix_to PERL5LIB lib/perl/`perl -e 'printf"%vd\n",$^V'`
|
||||
add_myprefix_to PERL5LIB share/perl/`perl -e 'printf"%vd\n",$^V'`
|
||||
add_myprefix_to R_LIBS lib/R:/usr/lib/R/site-library
|
||||
add_to PATH ~/build/android-sdk-linux_86/platform-tools:~/build/android-sdk-linux_86/tools
|
||||
|
||||
# ZLE {{{1
|
||||
bindkey '\e[3~' delete-char
|
||||
bindkey "\e[1~" beginning-of-line
|
||||
@ -51,14 +20,6 @@ prompt gebner
|
||||
# Window Title {{{1
|
||||
chpwd() { [[ -t 1 ]] && print -Pn '\e]2;%n@%m:%~\a' }; chpwd
|
||||
|
||||
# Customisation of Programs {{{1
|
||||
alias ls='ls --color=auto'
|
||||
export EMAIL='Gabriel Ebner <ge@gabrielebner.at>'
|
||||
test -x /usr/bin/lesspipe && export LESSOPEN="|lesspipe.sh %s"
|
||||
test -x /usr/bin/vim && export EDITOR=/usr/bin/vim
|
||||
|
||||
export MPD_HOST=127.0.0.1 MPD_PORT=6600
|
||||
|
||||
# History {{{1
|
||||
setopt APPEND_HISTORY SHARE_HISTORY EXTENDED_HISTORY INC_APPEND_HISTORY \
|
||||
HIST_IGNORE_ALL_DUPS HIST_FIND_NO_DUPS HIST_IGNORE_SPACE
|
||||
|
Loading…
Reference in New Issue
Block a user