自慢の.*rcを貼り付けるスレ

このエントリーをはてなブックマークに追加
1名無しさん@お腹いっぱい。
#!/bin/2ch
# 自慢の.*rcを見せて下さい
# shellの.*rcに限定しません
# .*rcの一部分でもOKです

# お約束
# ・いいrcがあったら自慢しる
# ・もっといい書き方があったら指摘しる
# ・いいものは自分で納得した上で利用しる(これ重要)

# 関連スレ
# 自慢の.emacsを貼り付けよう
# http://pc.2ch.net/test/read.cgi/unix/1001393679/
2げとずさ
このスレの元になったネタ
http://pc.2ch.net/test/read.cgi/unix/1027820464/31-33n
.newsrc はりつけてもよいの〜?
自慢できるなら。
俺ははずかしくてさらせない。
.profile いいっすか?
>>6
もちろん問題ないだろ
.xsession-errors いいでしょうか?
9名無しさん@お腹いっぱい。:02/07/29 16:38
.xsession-errorsでどういう自慢をするか期待age
とりあえず
alias google='w3m http://www.google.com/intl/ja/'
alias 2ch='emacs -e navi2ch'
> cat ~/.vimrc
(略)
set fileencodings+=euc-jp << ここを sjisに変更ですか?
貼っつけてみようかと思ったが、長いので省略
addpath VAR path ...
変数VARに含まれていないpathを追加。
rmpath VAR path ...
変数VARからpathを削除。
unifypath VAR
変数VARの重複したpathを取り除く。
alias maek make
alias meak make
alias amke make
alias vm mv
alias gnuzip gunzip
alias Grep grep (これみんなハマるでしょ?)

% alias|wc ~
107 441 3006
>>14
> alias Grep grep (これみんなハマるでしょ?)
そんなにハマるか?
>>14
この手のは入れないことにしてる。
他人のマシンを使ったときに苦労するので。
>>15
cat ~/.cshrc|Grep alias
みたいな pipe のあとでよく miss type したり。しない?

>>16
それもひとつの見識だと思う。alias l less してるので、
人の環境触ると 謎の l コマンド多発。
alias pkg='ls /var/db/pkg | less'
>>17
alias にしちゃうと、それが typo であると意識せずに指が覚えちゃうかも。
> alias l less
とはちょっと違うと思われ。
有名なのが出てないじゃん
alias sl=ls
>>17
> cat ~/.cshrc|Grep alias
はしないなぁ。

> alias l less
漏れは
alias l=ls ls='command ls $LS_OPTIONS'
alias le=less

lt=lessにすべきかとも思ったんだが
自戒
alias sl=mozilla
>>20
ふつー /usr/local/bin/sl
>>22
じゃー
alias sl='rm -rf'
alias f 'foreach f ( \!* )'

こんなんもあった。そうか、f って標準コマンドじゃなかったか。

>>19
なるほど了解。でも、実は
set correct=cmd (tcsh のスペル訂正on)
もしてたり。さすがに少数派でしょうな。慣れると悪くない、んだけど。
alias x startx
alias w3m w3m -B
alias ntp ntpdate xxxx.xxx.xx
alias cls clear
alias mergehist 'history -M && history -S'
以前は precmd にしてたことも。
$ echo 'unalias -a' >> .bashrc
29名無しさん@お腹いっぱい。:02/07/30 12:46
.fdrc

bind u "OUT_DIR"
bind h "CUR_LEFT"
bind l "CUR_RIGHT"
bind j "CUR_DOWN"
bind k "CUR_UP"
bind SPACE "LAUNCH_FILE" "IN_DIR"
bind e "emacsclient" "NO_OPERATION"

片手で移動。っつか、今時 fd 使う奴はいないか。
fdってなんすか?

mona@lisa$ which fd
no fd in /home/mona/bin /usr/local/bin /usr/pkg/bin /usr/X11R6/bin /usr/sbin /sbin /usr/bin /bin /usr/games
mona@lisa$
ttp://www.freebsd.org/cgi/url.cgi?ports/shells/fd/pkg-descr
FD を知らない香具師が居るとは……
(漏れも DOS ではメインに使ってたけど今はあんまり使ってないけどね。
32名無しさん@Emacs:02/07/30 22:05
dosは貧弱だからFDが必要だったと思うのですが、
shellの機能が強けりゃいらんでしょ。
>>32
dos時代のようにFD立ち上げっぱなしという使い方はほとんどされてないと
思うけど、ぱぱっとツリーの概要を掴みたい時やディレクトリ内のファイル
を適宜選択して処理したい時なんかには便利な場面もまだまだあるよ。
個人的ポリシー

コマンドのMESSAGEは英語で。
しかし、日本語が入力、表示は必須。
X上のソフトのメニューは日本語。

この為に
~/.zshenvに
export LC_CTYPE=ja_JP.eucJP

~/.xsessionに
. $HOME/.zshenv
LC_MESSAGES=ja_JP.eucJP fluxbox

している。そうする事でとりあえず満足。

fluxboxから立ち上げるgkrellmは英語がいいので
~/.fluxbox/keysに
Mod3 L :ExecCommand LC_MESSAGES=C gkrellm -w
している。
35名無しさん@お腹いっぱい。:02/08/05 22:39
login shell は /bin/sh にしておいて .profile で切り替える。
NIS環境で(゚д゚)ウマー

#!/bin/sh
export SHELL
[ -x /usr/local/bin/zsh ]&& SHELL=/usr/local/bin/zsh&& exec /usr/local/bin/zsh -l
[ -x /usr/pkg/bin/zsh ]&& SHELL=/usr/pkg/bin/zsh&& exec /usr/pkg/bin/zsh -l
[ -x /bin/zsh ]&& SHELL=/bin/zsh&& exec /bin/zsh -l
#[ -x /usr/local/bin/bash ]&& SHELL=/usr/local/bin/bash&& exec /usr/local/bin/bash --login
[ -x /usr/local/bin/tcsh ]&& SHELL=/usr/local/bin/tcsh&& exec /usr/local/bin/tcsh -l
[ -x /usr/pkg/bin/tcsh ]&& SHELL=/usr/pkg/bin/tcsh&& exec /usr/pkg/bin/tcsh -l
[ -x /usr/bin/tcsh ]&& SHELL=/usr/bin/tcsh&& exec /usr/bin/tcsh -l
[ -x /bin/tcsh ]&& SHELL=/bin/tcsh&& exec /bin/tcsh -l
[ -x /usr/local/bin/csh ]&& SHELL=/usr/local/bin/csh&& exec /usr/local/bin/csh -l
[ -x /usr/bin/csh ]&& SHELL=/usr/bin/csh&& exec /usr/bin/csh -l
[ -x /bin/csh ]&& SHELL=/bin/csh&& exec /bin/csh -l
>>35
なるほどうまい。EDITOR とかでも応用きくかも。
でも xdm セッションだと .profile 読まれんとちゃう?
3735:02/08/05 23:04
>>36

漏れは icewm 使ってるんだが、.xsession のケツで exec kterm -ls してる
んで気づかんかった。

icewm の taskbar から kterm 上げてみたんだが、確かに sh になっちまうな。
>>37
*vt100*loginShell: true
.profile (or .login) 読み込みのオーバヘッド…まぁどうでもいいか。
漏れは .xsession で細工しようかとおもた。
40hage:02/08/06 03:46
autoload -U history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^p" history-beginning-search-backward-end
bindkey "^n" history-beginning-search-forward-end
autoload -U history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^[OA" history-beginning-search-backward-end
bindkey "^[OB" history-beginning-search-forward-end
autoload -U history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^[[A" history-beginning-search-backward-end
bindkey "^[[B" history-beginning-search-forward-end
bindkey '^[p' up-line-or-history
bindkey '^[n' down-line-or-history
bindkey -s '^x`' '\C-a`\C-e`'
bindkey -s "^xp" '$(pwd)/'
#bindkey -s "^xp" "`pwd`/"
bindkey -s "^xl" 'ggg\C-j'
bindkey -s '^xM' '>>dummy-memo\C-j'
bindkey -s '^xG' 'ggmmg\C-j'
autoload -U google
zle -N ggmmg google
bindkey '^xa' 'ggmmg'
#bindkey -s "^xl" 'w\C-j'
bindkey -s "^xd" "$(date '+%Y%m%d')"
bindkey -s "^xxb" "sudo /usr/sbin/ntpdate -b clock.nc.fukuoka-u.ac.jp"
#bindkey -s ^X^E"^Ufg %$EDITOR"
#autoload incremental-complete-word
#zle -N incremental-complete-word

#bindkey '\C-xI' incremental-complete-word
bindkey -s "^xi" '\C-a`\C-e`\C-aforeach i \(\C-e\)'
bindkey '^x^I' expand-or-complete-prefix
bindkey -s '^X^Z' '%-^M'
bindkey '^[e' expand-cmd-path
bindkey '^[^I' reverse-menu-complete
bindkey '^X^N' accept-and-infer-next-history
# 要検討
bindkey -s '^[l' '~/\C-x*'
41zeh:02/08/06 03:47
上は.zshrcね。
.tcshrcとは違う。
>>39
.xsession に
export ENV=$HOME/.profile
とかではだめ?
43zsh:02/08/06 03:56
bindkey -s "^xi" '\C-a`\C-e`\C-aforeach i \(\C-e\)'
bindkey -s '^[l' '\eb~/\ef\C-x*'
とかはかなりイイ。
普段は、C-mな俺は、C-jを
bindkey '^j' accept-and-infer-next-history
に、また
bindkey '^[^I' reverse-menu-complete
も直感的でイイ。
また、キーマップ指定で、
bindkey -M menuselect 'キー' command
とできるのもイイ。


>>42
ENVに突っ込んじゃうと、login時ではなく、shellの起動時に毎回読まれるから
かなりマズーだと思われ。
.xsessionを#!/bin/shで書いて. $HOME/.profileするのがいいんじゃないかと。
4542:02/08/06 04:05
ごめん、逝ってくる
http://www.gentei.org/~yuuji/rec/pc/intro-screen.html
広瀬雄二さんのページにある.screenrcの設定では
emacs -nw や vim が色表示でなく、Bold体や下線表示になる。
どーやって解決すればいいでしょうか?
すれ違いですか



スレ違いではないと思うが、 screen スレで聞いたほうが適切な
レスがつくのでは。
function wget(){
wget `echo $* | sed -e 's/[^h]ttp:/ http:/'`
}
>48
むしろ、's/\<[^h]\?ttp:/ http:/' の方がと逝ってみるテスト。
>>48
おおう、それはいい感じだ。なので age
csh系だとこんな感じかな。
alias wget 'wget `echo \!*| sed -e "s/[^h]ttp:/ http:/"`'
51名無しさん@お膜いっぱい。:02/08/19 22:03
age 失敗なので再度。s/wget/w3m/ もよさげ
cygwin 用

function view {
explorer `cygpath -w $1`
}

function open {
cmd /c `cygpath -w $1`
}
>>52
cygstart
55名無しさん@お腹いっぱい。:02/09/24 15:23
だれか、自慢のシェルスクリプトない?
シェルスクリプトは普通 *.rc じゃないな。
だれかカコイイcolorrc見せてください
58.bashrc (for cygwin):02/11/13 08:52
## 昔、超テキトーに書いて使ってたやつ
## 間違いが結構ありそう...

ZIP=bzip2 # or gzip
EXT=tar.bz2 # or tar.gz

# display the contents of archives
function zt () {
for arc in $@; do
$ZIP -cd $arc | tar tvf -
done
}

# extract archives
function zx () {
for arc in $@; do
if [ ! -f $arc ]; then
echo "$arc: doesn't seem to be an archive. skipping ..."
continue
fi
target=`basename $arc $EXT`
$ZIP -cd $arc | tar xf -
echo -n $arc
echo -n ": successfuly extracted"
if [ -d $target ]; then
rm -rf $arc
echo -n " and $arc erased"
fi
echo "."
done
echo "... finished."
}
59.bashrc (for cygwin):02/11/13 08:52
# compress `directory' into `directory.tar.{gz,bz2}'
function zz () {
for arc in $@; do
if [ ! -d $arc ]; then
$ZIP $arc
echo "$arc: successfully compressed."
continue
fi
dir=`basename ${arc}`
target=$dir.$EXT
tar cf - $arc | $ZIP > $target
echo -n "$target: successfully compressed"
if [ -f $target ]; then
rm -rf $arc
echo -n " and $arc erased"
fi
echo "."
done
echo "... finished."
}
60.bashrc (for cygwin):02/11/13 08:56
## どっかで拾ったヤシ
function gc() {
if [ $1 = "-m" ]; then
math="-lm"
shift
else
math=""
fi

for source in $@; do
binary=$(basename "$source" .c)
if [ -f "$source" ]; then
errorlog="${binary}.err"
if gcc -Wall -o "$binary" "$source" $math > "$errorlog" 2>&1; then
echo Made \"$binary\" from \"$source\"
else
echo Error: \"$source\" could not be compiled, see \"$errorlog\"
fi
else
echo Error: File \"$source\" does not exist
fi
done
}
61山崎渉:03/01/15 13:22
(^^)
umask 002はSuEXECで実行されなくて悩んだのでやめた。

# [[ $UID > 0 && $UID == $GID ]] && umask 002 || umask 022
umask 022
[[ $UID = 0 ]] && TMOUT=600
>>60
$ export CFLAGS=-Wall CC=gcc
$ cat hello.c
#include <stdio.h>
int main()
{
printf("Hello, world\n");
return 0;
}
$ ls GNUmakefile Makefile
ls: GNUmakefile: そのようなファイルやディレクトリはありません
ls: Makefile: そのようなファイルやディレクトリはありません
$ make hello
gcc -Wall hello.c -o hello
$ ./hello
Hello, world
>>63
$ ls makefile
makefile
$
$ cat makefile
love:
    @echo "dunno how to make $@"
66山崎渉:03/04/17 12:30
(^^)
67あぼーん:あぼーん
あぼーん
68あぼーん:あぼーん
あぼーん
69あぼーん:あぼーん
あぼーん
70あぼーん:あぼーん
あぼーん
71あぼーん:あぼーん
あぼーん
72あぼーん:あぼーん
あぼーん
エロ.*rcうpキボンヌ
74sage:04/09/18 12:36:29
保守
細々とでも続いているならともかく、
一年半以上まともなポストがないスレなんか保守するなよ。

ホッシュ
77名無しさん@お腹いっぱい。:05/01/29 11:23:03
>>40
fukuoka-uのは過負荷につき使わないように。参考 http://wiki.nothing.sh/page/NTP
78名無しさん@お腹いっぱい。:05/01/29 11:45:32
僕の、~/.plan です。

The following list is my task.

Pretty Cure on air Sun 08:30 TV Asahi http://www.toei-anim.co.jp/tv/precure/
UTA-KATA on air Sun 23:30 Chiba TV http://www.uta-kata.com/
GENSHIKEN on air Sun 24:00 Chiba TV http://www.genshiken.info/
Musumet on air Sun 24:30 Chiba TV http://musumet.jp/
Gakuen Alice on air Sat 08:06 NHK BS2 http://www.sonymusic.co.jp/Animation/alice/
Rozen Maiden on air Thu 25:55 TBS http://www.tbs.co.jp/rozen-maiden/
イケてる .logout ってないですか?
clear
echo \
' ## \
##\
###############################\
# ## #\
# ## ## ## #\
# ## ## ## #\
# ## #\
# ## #\
# ######## #\
# ## #\
# ## ## ## #\
# ################### #\
# ## #\
# ## #\
###############################\
##\
'
banner \ \ MacOS
echo '\'

自慢の.fvwmrc F4で窓閉じ、F7F8でアクティブ窓切り替え、F9で窓移動 ページャもあるよ!マウス要らずがテーマ。
http://www.uploda.org/file/uporg42819.txt
しまった、直りんしてしまった。ごめんあさい。
82名無しさん@お腹いっぱい。
ついでにあげ