zsh short cut(keybind -e)
2008年08月13日 (linux)
キー | 操作 |
---|---|
Ctrl+a | カーソルを行頭に移動 |
Ctrl+e | カーソルを行末に移動 |
Ctrl+y | ヤンク |
Ctrl+k | カーソルから行末までを削除 |
Ctrl+w | カーソルから行頭までを削除 |
Ctrl+u | 一行削除 |
Ctrl+b | ← |
Ctrl+f | → |
Ctrl+p | ↑ |
Ctrl+n | ↓ |
Ctrl+d | delete |
Ctrl+h | backspace |
Ctrl+l | clear |
Ctrl+i | tab |
PR
zsh short cut(keybind -v)
2008年08月13日 (linux)
キー | 操作 |
---|---|
(insert mode) Esc | コマンドモードへ |
(command mode) i | カーソルの前に移動し挿入モードに |
(command mode) a | カーソルの後ろに移動し挿入モードに |
(command mode) I | 行頭に移動し挿入モードに |
(command mode) A | 行末に移動し挿入モードに |
(command mode) td | 一行削除 |
(command mode) l | ← |
(command mode) h | → |
(command mode) k | ↑ |
(command mode) j | ↓ |
(command mode) u | アンドゥ,再入力でリドゥ |
(command mode) yy | 1行ヤンク |
(command mode) p | ペースト |
(command mode) D | カーソルから行末までを削除 |
(command mode) Ctrl+R | カーソル位置から置換モードへ |
(insert mode) Ctrl+j | コマンド実行 |
(insert mode) Ctrl+u | カーソルから行頭までを削除 |
(insert mode) Ctrl+s | 画面表示を一時停止 |
(insert mode) Ctrl+q | 画面表示を再開 |
(insert mode) Ctrl+l | clear |
(insert mode) Ctrl+d | exit |
sample_for2.sh
2008年08月13日 (shellscript)
source
#!/bin/sh #sample for 2 for i in `seq 1 $1` do echo $i done
sample execution
% sh sample_for2.sh 3 1 2 3 % sh sample_for2.sh 5 1 2 3 4 5 %
note
他言語のfor文の使いかたに近く,さらに行数を減らせるのでクールかもしれない.
rand.sh
2008年08月12日 (shellscript)
source
#!/bin/sh #random if [ $# -ne 1 ]; then echo "Usage: $0 DISIT_NUMBER" exit 1 fi expr $1 + 0 >/dev/null 2>&1 if [ $? -ne 0 ]; then echo "Usage: $0 DISIT_NUMBER" exit 2 fi i=$1 while [ $i -gt 0 ] do RAND=`expr $RANDOM % 10` echo -n $RAND i=`expr $i - 1` done echo
sample execution
% ./rand.sh 5 73238 % ./rand.sh 10 5075273799 % ./rand.sh a Usage: ./rand.sh DISIT_NUMBER % ./rand.sh 5 10 Usage: ./rand.sh DISIT_NUMBER
note
引数に数字を与えたらその数字の桁数の乱数を生成するシェルスクリプト. ASCII文字,引数が2つ以上の場合はエラーで終了.
bbkeys: my bbkeysrc 080810
2008年08月10日 (X)
source
# default bbkeys definitions.... [begin] (bbkeys configuration file) [config] [option] (stylefile) {~/local/blackbox-CVS/share/blackbox/styles/Cthulhain} [option] (honorModifiers) {false} [option] (raiseWhileCycling) {false} [option] (showCycleMenu) {true} [option] (menuTextJustify) {center} [option] (autoConfig) {true} [option] (autoConfigCheckTimeout) {2} [option] (workspaceColumns) {4} # [option] (workspaceRows) {2} # only one can be effective at a time # if both are given, workspaceColumns takes precedence [option] (cycleMenuX) {500} [option] (cycleMenuY) {500} [end] [keybindings] (begin keybindings) [chain] (Control-Mod1-W) [sendToWorkspace] (1) {1} [sendToWorkspace] (2) {2} [sendToWorkspace] (3) {3} [sendToWorkspace] (4) {4} [sendToWorkspace] (5) {5} [sendToWorkspace] (6) {6} [sendToWorkspace] (7) {7} [sendToWorkspace] (8) {8} [end] [Lower] (Mod1-Down) [Raise] (Mod1-Up) [toggleShade] (Mod1-F9) [Close] (Mod1-F4) #[Iconify] (Mod1-m) [toggleMaximizeFull] (Mod1-F12) [toggleMaximizeHorizontal] (Mod1-F11) [toggleMaximizeVertical] (Mod1-F10) [toggleOmnipresent] (Mod1-Control-S) #[resizeWindowWidth] (Mod1-Control-Shift-Left) {-5} #[resizeWindowWidth] (Mod1-Control-Shift-Right) {5} #[resizeWindowHeight] (Mod1-Control-Shift-Up) {-5} #[resizeWindowHeight] (Mod1-Control-Shift-Down) {5} [moveWindowUp] (Mod1-Control-Up) {1} [moveWindowDown] (Mod1-Control-Down) {1} [moveWindowLeft] (Mod1-Control-Left) {1} [moveWindowRight] (Mod1-Control-Right) {1} [NextWindow] (Mod1-Tab) [NextWindowOnAllWorkspaces] (Mod1-Control-Tab) [PrevWindow] (Mod1-Shift-Tab) [changeWorkspace] (Mod1-1) {1} [changeWorkspace] (Mod1-2) {2} [changeWorkspace] (Mod1-3) {3} [changeWorkspace] (Mod1-4) {4} [changeWorkspace] (Mod1-5) {5} [changeWorkspace] (Mod1-6) {6} [changeWorkspace] (Mod1-7) {7} [changeWorkspace] (Mod1-8) {8} #[upWorkspace] (Mod1-Control-K) #[downWorkspace] (Mod1-Control-J) #[leftWorkspace] (Mod1-Control-H) #[rightWorkspace] (Mod1-Control-L) [showRootMenu] (Mod1-Control-Escape) #[Execute] (Mod1-F5) {xrefresh} #[Execute] (Mod1-F1) {gnome-terminal} #[Execute] (Mod4-E) {kfmclient openProfile filemanagement} #[Execute] (F20) {kfmclient openProfile filemanagement} #[Execute] (Mod4-E) {nautilus ~} #[Execute] (F20) {nautilus ~} [end] (end keybindings) [end] (end bbkeys configuration)
~/.bbkeysrc