blog.sowatchasayin

Rails etc.

Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

zsh導入

以下を参考に入れました。
最初使ったときに対話式でいろいろ設定を促してくれるんで、助かりました。
特に変態的な使い方をしなくとも、もろもろbashより気が利いてると思います。viモードもbashより調子いい。
漢のzsh
zsh: Prompt Expansion
zshの基本的な使い方 1/3 「導入~基本設定」編
ANSI color codes

.zshrcです。

# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=100000
SAVEHIST=100000
setopt appendhistory autocd extendedglob notify auto_pushd correct
unsetopt beep nomatch
bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/fu/.zshrc'

autoload -Uz compinit
compinit
# End of lines added by compinstall

autoload colors
colors
SPROMPT="%B%{${bg[green]}%}%r ? %{${reset_color}%}%b n,y,a,e :"
PROMPT="%B%{${fg[green]}%}%n@%m %~% %(!.#.$) %{${reset_color}%}%b"
RPROMPT="%{${fg[magenta]}%}%*%{${reset_color}%}%"


autoload history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^r" history-incremental-search-backward
alias lv='lv -c'
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
export PATH=/var/lib/gems/1.8/bin:$PATH


右のプロンプトに時計が出るのはいいですよ。ふと見るとハマってたのに気がつくという。

CUIのユーザビリティって、ありますよね。

bash to rush

Rubyっぽいbash。まじですか。
Rush
rush is a replacement for the unix shell (bash, zsh, etc) which uses pure Ruby syntax.

確かに、BashのUI(interfaceなのは間違いないよね)はたまにヒドイ。Rubyにしたくなる気持ちはわかる。
しかし、、、これはやっぱりきもい。
myproj.ls
myproj['app/models/my_model.rb'].vi
まさかのリモートアクセスもできます。

ここで知りました。
Blink #1 - The first in a series of Link-Blogging posts

ドsudo

なまえ ALL=(ALL) NOPASSWD: ALL
# Uncomment to allow members of group sudo to not need a password
# (Note that later entries override this, so you might need to move
# it further down)
# %sudo ALL=NOPASSWD: ALL

でOK

Author

Fujimura Daisuke
http://fujimuradaisuke.com

Labels