gnupack 6.02リリース

ここに書くのは今更ですが,gnupack 6.02リリースしました.今回は,gnupack startupのフォント読み込みでメモリ破壊を起こしていた処理を改修しました.フォーラムでご指摘くださった方には感謝です.

あと .bashrcに色々設定を追加してみました.このあたりは使われている方の評判を聞いてみたいところ(特に追加の関数は,なんだか微妙な気がしてきました.良い評判が聞こえないようなら削除しようか…)



# -------------------------------------------------------------
# environment

# history
export HISTCONTROL="ignoreboth"
export HISTFILESIZE="4096"
export HISTSIZE="4096"

# -------------------------------------------------------------
# shell option

# interaction mode
if [[ "${PS1}" ]] ; then
shopt -s cmdhist
shopt -s histappend
shopt -s checkwinsize
shopt -s no_empty_cmd_completion
shopt -u histappend
shopt -q -s cdspell
shopt -q -s checkwinsize
shopt -s cmdhist
fi

# -------------------------------------------------------------
# terminal

case ${TERM} in
"xterm")
stty -ixon -ixoff
eval $(dircolors ~/.dir_colors)
alias ls='ls --classify --color=auto --show-control-char'
;;
"emacs")
export LS_COLORS='no=00:fi=00:di=35:ln=36:ex=32'
export TERM_LENGTH='90'
alias ls='ls --classify --color --show-control-char -C'
;;
esac

# -------------------------------------------------------------
# complete

complete -d cd

# -------------------------------------------------------------
# function

# change current directory to clipboard
function ccd {
typeset _BufDir
_BufDir="$(getclip)"
if [[ -d "${_BufDir}" ]] ; then
cd "${_BufDir}"
else
test "${TERM}" = "cygwin" -o "${TERM}" = "rxvt" -o "${TERM}" = "vt100" \
&& cd /top
fi
}

# search history
function his {
typeset _Key
typeset _Cmd
for _Key in "$@" ; do
_Cmd="${_Cmd:=} | \grep \"${_Key}\""
done
eval "history ${_Cmd}" | perl -n -e 's/\s+(\d+)\s+(.*)/$1,$2/; print "$2\n";' | \
grep -v '^his ' | uniq | tee /dev/clipboard
cat /dev/clipboard | tr -d "\n" > /dev/clipboard
}


ダウンロードはこちらから.