回答編集履歴

3

誤動作のため修正

2017/01/31 11:12

投稿

fullmated
fullmated

スコア19

test CHANGED
@@ -48,13 +48,13 @@
48
48
 
49
49
  # historyのキャッシュを保存して、HISTFILEを切り替える
50
50
 
51
- eval "history -a" # write down the cache on HISTFILE
51
+ eval "history -w $HISTFILE" # write down the cache on HISTFILE
52
+
53
+ eval "history -c" # delete cache
52
54
 
53
55
  export HISTFILE=$histfile
54
56
 
55
- eval "history -c" # delete cache
56
-
57
- eval "history -n" # read HISTFILE and set up new cache
57
+ eval "history -r $HISTFILE" # read HISTFILE and set up new cache
58
58
 
59
59
  ```
60
60
 

2

参考を追加

2017/01/31 11:12

投稿

fullmated
fullmated

スコア19

test CHANGED
@@ -57,3 +57,9 @@
57
57
  eval "history -n" # read HISTFILE and set up new cache
58
58
 
59
59
  ```
60
+
61
+
62
+
63
+ 追加参考
64
+
65
+ http://omoshiro-joho.com/tech-center/tips/tips_200408170045.html

1

使い方をメモり

2017/01/31 10:45

投稿

fullmated
fullmated

スコア19

test CHANGED
@@ -1,4 +1,6 @@
1
- 変更後のコードです。
1
+ 解決後のコードです。使い方は以下の通り。
2
+
3
+ $ source this.sh {normal or lpic}
2
4
 
3
5
 
4
6