Skip to content

Instantly share code, notes, and snippets.

@miwarin
Created May 14, 2018 14:10
Show Gist options
  • Save miwarin/c5d44311fd4018823b9affae81d2b625 to your computer and use it in GitHub Desktop.
Save miwarin/c5d44311fd4018823b9affae81d2b625 to your computer and use it in GitHub Desktop.
###################################################################
# Plamo Linux ?????????????????????????? .zshrc
# Chisato Yamauchi (cyamauch@phyas.aichi-edu.ac.jp)
# Time-stamp: <2009-10-20 19:31:32 rin>
# color-ls
# ?????????? ~/.dir_colors
if which dircolors >& /dev/null; then
eval `dircolors -b ~/.dir_colors`
LS_OPTIONS=(--color=auto -F -T 0 -N) ;
else
LS_OPTIONS=(-F -T) ;
fi
if [ $TERM ] ; then
if [ "$TERM" = "dumb" ] ; then
LS_OPTIONS=(-F -T) ;
fi
fi
export LS_OPTIONS
alias ls='/bin/ls $LS_OPTIONS';
PS1='%n@%m[%~]%# '
typeset +x PS1
HISTFILE=$HOME/.zhistory
HISTSIZE=512
SAVEHIST=512
setopt share_history
setopt autolist
unsetopt prompt_cr
setopt hist_ignore_dups
setopt no_check_jobs
setopt no_hup
setopt prompt_subst
setopt auto_cd
setopt auto_pushd
setopt pushd_ignore_dups
autoload -U compinit
compinit
zstyle ':completion:*' list-colors 'di=34' 'ln=35' 'so=32' 'ex=31' 'bd=46;34' 'cd=43;34'
bindkey -e
#setopt ignoreeof
bindkey "^[[5~" history-search-backward
bindkey "^[[3~" history-search-backward
bindkey "^[[6~" history-search-forward
bindkey "^[[A" history-search-backward
bindkey "^[[B" history-search-forward
#bindkey "^[[A" backward-word
#bindkey "^[[B" forward-word
stty erase '^H'
stty werase '^W'
stty stop undef
# aliases
alias h='history'
alias rmdvi='rm *.dvi ; rm *.log ; rm *.aux ; rm *.toc'
alias rmback='rm *~ ; rm *.bak'
alias j='jobs -l'
alias ll='ls -lF'
alias z='suspend'
alias x='exit'
alias less='command less -X'
alias LS='ls -alF | command less -E -X'
alias mu='mule -rv'
alias ls="gls --color -F"
# csh emulation
setenv () {
if [ $# -eq 0 ]; then
/usr/bin/printenv
else
export $1=$*[2,-1]
fi
}
alias unsetenv=unset
## ??????????????????????????????????????????
## Debian ?? Plamo ??????
## http://www.linet.gr.jp/ML/plamo/200201/msg00096.html
## Subject: [plamo:12670] Re: Plamo ????????????????
## From: Yoshinori Ariie <PBA00250@nifty.com>
## Date: Sat, 19 Jan 2002 01:12:08 +0900
##
# get distibution/version
if [ -f /etc/default/rcS ]; then # Debian/Linux
DISTRIBUTION=debian
DISTVER=`cat /etc/debian_version`
elif [ -f /etc/rc.d/rc.S ]; then # Plamo/Slackware
# case of Plamo/Slackware
if [ -d /usr/lib/setup ]; then
pushd `pwd` &> /dev/null
cd /usr/lib/setup
DISTRIBUTION=`ls -1 *-version-* | cut -d '-' -f 1`
DISTVER=`ls -1 *-version-* | cut -d '-' -f 3`
popd &> /dev/null
fi
else # unknown distribution
DISTRIBUTION=unknown
fi
export DISTRIBUTION DISTVER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment