From ea9dedd0fb2d5c08dd09eb98474d3e844fc60daf Mon Sep 17 00:00:00 2001 From: LAN-TW Date: Sun, 20 Nov 2011 21:39:44 +0800 Subject: bash_include: 產生 screen ACL 設定檔、文字轉 HTML | vimrc: 錯誤訊息放家目錄 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bash_include | 37 ++++++++++++++++++++++++++++++++++++- vimrc | 12 ++++++------ 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/bash_include b/bash_include index 6ab16fa..85b7709 100644 --- a/bash_include +++ b/bash_include @@ -9,7 +9,7 @@ alias stopcolor='PS1=$nocolorprompting' alias ll='ls -l' alias rm='rm -i' -alias cp='cp -i' +alias cp='cp -pi' alias mv='mv -i' alias jobs='jobs -l' alias less='less -RS' @@ -24,6 +24,8 @@ default_tty_setting=`stty -g` alias savetty='default_tty_setting=`stty -g`' alias resetty='stty $default_tty_setting' +alias sg='sudo -g' + # Function function compile_all () @@ -68,6 +70,37 @@ function compile_all () } +function convert_to_html () +{ + while [ "$1" '!=' '' ] + do + for i in "$1" + do + vim $i -c 'set background=dark' \ + -c 'highlight PreProc ctermfg=darkcyan' \ + -c "$BEFORE_CONVERT_TO_HTML" \ + -c TOhtml \ + -c :w \ + -c :qa + done + shift + done +} + +function mkscreenacl () +{ + PERMIT_COMMAND="select windowlist other meta detach reset hardcopy info redisplay lastmsg next prev xon xoff windows suspend help colon copy paste writebuf readbuf displays stuff attach" + while [ "$1" '!=' '' ] + do + for i in $PERMIT_COMMAND + do + echo "aclchg $1 +x $i" + done + echo "aclchg $1 -rw \"#?\"" + shift + done +} + # Starting doing something startcolor @@ -78,3 +111,5 @@ bind '"\e[A":history-search-backward' bind '"\e[B":history-search-forward' shopt -s histappend + +# ~/check_dmesg.sh 5 & diff --git a/vimrc b/vimrc index cca6b61..6c4af1c 100644 --- a/vimrc +++ b/vimrc @@ -1,5 +1,5 @@ -let $ERRFILE="/tmp/f8fe1f28-6e6e-11e0-b22e-000c760ae4c6.err" -let $CFLAGS="-Wall -pipe" +let $ERRFILE="/tmp/fc0edaa9-1383-11e1-8659-000c760ae4c6.err" +let $CFLAGS="-Wall -pipe -g" let $LDFLAGS="" set bs=2 set ls=2 @@ -17,11 +17,11 @@ highlight Search term=reverse ctermbg=4 ctermfg=7 function! SingleCompile() let file_suffix = expand("%:e") if file_suffix == "c" - !gcc ${CFLAGS} %:p:. -o %:r ${LDFLAGS} 2>&1 | tee ${ERRFILE} - cg ${ERRFILE} + !gcc ${CFLAGS} %:p:. -o %:r ${LDFLAGS} 2>&1 | tee ${HOME}${ERRFILE} + cg ${HOME}${ERRFILE} elseif file_suffix == "cpp" - !g++ ${CFLAGS} %:p:. -o %:r ${LDFLAGS} 2>&1 | tee ${ERRFILE} - cg ${ERRFILE} + !g++ ${CFLAGS} %:p:. -o %:r ${LDFLAGS} 2>&1 | tee ${HOME}${ERRFILE} + cg ${HOME}${ERRFILE} else echo "This file has an UNKNOWN SUFFIX!" endif -- cgit