Screen and history?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
24 views
In my ubuntu, I use terminal multiplexer Screen. With their functions, he manages to perfectly, but one screw-up he has is the history of commands. With her strange shit, but your team there I can not find. Can anyone tell how to make so that the history command work as it should?
by | 24 views

4 Answers

0 like 0 dislike
I think one bash You peristere history other:
\r
Offer:
1. To add, not overwrite
shopt-s histappend
\r
2. Multi-line command to store one line (optional):
shopt-s cmdhist
\r
3. After each command to dump the history and perechitivay shared history (that is, if you want to be a team of one bash began to appear in the other).
export PROMPT_COMMAND='history-a; history-n'
\r
4. Cosmetics: do not remember the repetition of commands not to save the specified commands
export HISTCONTROL="ignoredups"
export HISTIGNORE="ls:l:ll:[bf]g:exit"
by
0 like 0 dislike
>> @yuretsz not understand. Tried to execute described in konsole and in a tty, and nothing came of WarGoth, today at 23:51
But you always use a screen? Try, for example, to look for cat .bash_history | grep aptitude and compare it with the memory that you installed.
by
0 like 0 dislike
Better just switch to zsh and include:
\r
setopt share_history # share history between multiple instances
\r
then the story will be shared between different Windows.
\r
\rzsh.sourceforge.net/Doc/Release/Options.html#SEC105
by
0 like 0 dislike
>> damnerd: And complete you "window", ie, Ctrl+D (or exit, or logout)?
As will have if the 1-3 session, then exit, and if more is Ctrl+D many times, but sometimes, of course, and that happens just reboot. The result (stored't understand how), like, would not be affected.
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Mar 24, 2019 by iandriyanov
0 like 0 dislike
6 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
27,099 users