[問題] reset sync history terminal

看板Linux作者 (gigigigi)時間12年前 (2014/01/12 15:01), 編輯推噓0(006)
留言6則, 3人參與, 最新討論串1/1
我習慣開很多個 terminal 或是 分頁處理不同事情 我用過ctrl + r 找 history command , 可是我發現在 terminal A 下的指令不會馬上讓 terminal B 知道~ 可能有什麼辦法可以讓它們 history 同步 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.204.69.151

01/12 15:25, , 1F
zsh開一個選項就可以 bash要自己寫script . 你是用哪種?
01/12 15:25, 1F

01/12 16:22, , 2F
http://ppt.cc/UG0p 我寫的bash script
01/12 16:22, 2F

01/12 16:25, , 3F
每個bash process 有各自的history,會同步到公共的
01/12 16:25, 3F

01/13 20:03, , 4F
bash
01/13 20:03, 4F

01/13 20:05, , 5F
PROMPT_COMMAND="history -n; history -a"
01/13 20:05, 5F

01/13 20:05, , 6F
網路上是找到這, …不過好像沒辦法定時update
01/13 20:05, 6F
文章代碼(AID): #1IqZtZIb (Linux)