- 追加された行はこの色です。
- 削除された行はこの色です。
#contents
過去の遺産というか適当。
* 色付cal
#!/usr/bin/perl
use strict;
my $colorSun = qq|\033[1;31m|;
my $colorSat = qq|\033[1;34m|;
my $colorToday = qq|\033[0;32m|;
my $colorNon = qq|\033[0m|;
my @cal = split(/\n/, `cal`);
my $date = sprintf("%2d", `date +%e`);
foreach my $i (1..$#cal) {
$cal[$i] = sprintf("%-20.20s", $cal[$i]);
$cal[$i] =~ s/^(.{2})(.{16})(.{2})$/$colorSun$1$colorNon$2$colorSat$3$colorNon/gm;
$cal[$i] =~ s/(?=^| )$date(?= |$)/$colorToday$date$colorNon/;
}
my $retval = join("\n",@cal);
print $retval."\n";
* 演習室.bashrc
alias ls='ls -F'
alias ll='ls -la'
alias less='jless'
alias tarc='tar czvf'
alias cal=ccal
export JLESSCHARSET=japanese-jis
export PAGER=jless
export LC_CTYPE=ja_JP.EUC
PS1='
\[\033[0;36m\]\u@\h \[\033[0;37m\]\w\[\033[0m\]
\$ '
export CLICOLOR=xterm-color
export LSCOLORS=exfxcxdxbxegedabagacad
export JSERVER=expwnn7
export MANPATH=$HOME/man:`manpath`
# for enshuD
export PATH=/home/exp/exppub/bin:$PATH
# for ports
export MASTER_SITE_OVERRIDE=ftp://ftp2.jp.FreeBSD.org/pub/FreeBSD/ports/distfiles/
export PORTSDIR=$HOME/ports
export PREFIX=$HOME
export DISTDIR=$HOME/ports/distfiles
# for package
#export PACKAGEROOT=ftp://ftp2.jp.freebsd.org
#export PKG_DBDIR=$HOME/package/pkg_db
* ph .cshrc
umask 22
set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin)
setenv EDITOR aee
setenv PAGER less
setenv BLOCKSIZE K
setenv CLICOLOR 1
setenv LSCOLORS Exfxcxdxbxegedabagacad
if ($?prompt) then
# An interactive shell -- set some stuff up
set filec
set history = 100
set savehist = 100
set savehist = (100 merge)
set autolist
set autoexpand
set color
set prompt = '%{\033[36m%n@%m%} %{\033[33m%~\033[00m%} \$ '
set prompt = '\n%{\e[36m%}%n@%m %{\e[33m%}%~%{\e[00m%} \n\$ '
set mail = (/var/mail/$USER)
if ( $?tcsh ) then
bindkey "^W" backward-delete-word
bindkey -k up history-search-backward
bindkey -k down history-search-forward
endif
endif
source .alias
* Linux .alias
alias h='history 25'
alias j='jobs -l'
alias ls='ls --color=auto -F'
alias la='ls -a'
alias lf='ls -FA'
alias ll='ls -lA'
alias less='jless'
alias tarc='tar czvf'
* FreeBSD .alias
alias h history 25
alias j jobs -l
alias ls ls -G
alias la ls -a
alias lf ls -FA
alias ll ls -lA
alias less jless -Kjapanese-sjis