トップ «前の日記(2009-08-26(Wed)) 最新 次の日記(2009-08-28(Fri))» 編集

屑俺日記

僕の備忘録(PC、UN*X、ネットワーク関連が中心)なんです。
自分の書いたところは適当(な時とか)に書き換えますので御了承を。


2009-08-27(Thu) 秋晴れっぽい

なんとなくzsh-4.3.10

をベーシックに近いLFS6.5に入れてみる。
chsh -s /bin/zsh $USER。そういえば/etc/shellsの類は 要らないのだろうか。
ログインすると、

This is the Z Shell configuration function for new users,
zsh-newuser-install.
You are seeing this message because you have no zsh startup files
(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory
~).  This function can help you with a few settings that should
make your use of the shell easier.
 
You can:
 
(q)  Quit and do nothing.  The function will be run again next time.
 
(0)  Exit, creating the file ~/.zshrc containing just a comment.
     That will prevent this function being run again.
 
(1)  Continue to the main menu.
 
--- Type one of the keys in parentheses ---

Enter打鍵で、

 
Aborting.
The function will be run again next time.  To prevent this, execute:
  touch ~/.zshrc

"1" でメニューに入り、適当に選択する。

% cat .zshrc
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt appendhistory autocd extendedglob nomatch notify
unsetopt beep
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/sato/.zshrc'
 
autoload -Uz compinit
compinit
# End of lines added by compinstall

zshの補完

% dd if=/dev/zero ; tab, tab
bs          -- block size
cbs         -- conversion buffer size
conv        -- specify conversions to apply
count       -- number of input blocks to copy
files       -- specify number of input files to copy and concatena
ibs         -- input block size
obs         -- output block size
of          -- specify output file
seek        -- output blocks initially skipped
skip        -- input blocks initially skipped

はいいけど、存在しないコマンドも補完しようとする。

% dpkg -
zsh: do you wish to see all 189 possibilities (48 lines)? 

なんてやられてもねぇ(Linux From Scratch-6.5だ)。

libgmp3-dev

を入れた環境でcoreutils-7.5をビルドすると、factor(1) もそれに応じたものになった(Ubuntu-9.04)。

$ factor 3490398490348038048302498
factor: `3490398490348038048302498' は長すぎます
 
$ ./factor 3490398490348038048302498
3490398490348038048302498: 2 17 4903 59580571 351422481269

man 1か6か知らないが、ともかくSL

SL on Console

LFS6.5に sl を入れてみた。
パッチも当ててみた( 改造版5 fix 1)。

そのままではビルドできなかった。
Makefile と sl.c を少し編集する。

% rcsdiff -r1.2 -r1.3  Makefile sl.c
===================================================================
RCS file: RCS/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -r1.2 -r1.3
13c13
< LDFLAGS = -lncurses -ltermcap
---
> LDFLAGS = -lncurses
===================================================================
RCS file: RCS/sl.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -r1.2 -r1.3
35,36d34
<   #include <ncurses/curses.h>
< #else
37a36
> #else

スクリーンショットを撮るのも面倒だが、gimpで編集するのも結構かかった。

Plamo-4.22も同じ修正をしないと、ビルドできなかった。

<追記(2009/08/28/>
ズレてるので貼り直す。
</追記>


リンクはご自由にどうぞ。でもURLや内容が変った場合はあしからず。

index.htmlは ここから。