使用Screen讓終端機可以記錄上一次的執行過程,以避免中斷連線後,無法繼續上次的作業。
安裝方法
pkg install screen
設定顯示風格
vi ~/.screenrc
# Start message startup_message off # Set hardstatus always on hardstatus alwayslastline " %-Lw%{= Bw}%n%f %t%{-}%+Lw %=| %M %d %0c:%s " # Set default encoding using utf8 defutf8 on # Refresh the display when exiting programs altscreen on # Dynamic title shelltitle '$ |bash' # Disable vbell vbell off # Keboard binding # bind F11 to move to previous window bindkey -k F1 prev # bind F12 to move to next window bindkey -k F2 next # bind Alt`~= to screen0~12 bindkey "^[`" select 0 bindkey "^[1" select 1 bindkey "^[2" select 2 bindkey "^[3" select 3 bindkey "^[4" select 4 bindkey "^[5" select 5 bindkey "^[6" select 6 bindkey "^[7" select 7 bindkey "^[8" select 8 bindkey "^[9" select 9 bindkey "^[0" select 10 bindkey "^[-" select 11 bindkey "^[=" select 12 # bind F7 to detach screen session (to background) bindkey -k k7 detach # bind F8 to kill current screen window bindkey -k k8 kill # bind F9 to create a new screen bindkey -k k9 screen # bind F10 to rename current screen window bindkey -k k; title hardstatus alwayslastline "%{= wk} %{by} %H %{wk} | %-Lw%{kw}◣%{= g}%n%f* %t%{wk}◤%{wk}%+Lw%< %= %{kw}◣%{= R} [%m/%d %c] %{-}" # remove some stupid / dangerous key bindings bind s bind k bind W bind ^k bind . bind ^\ bind \\ bind ^h bind h
沒有留言:
張貼留言