LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-28-2014, 01:28 PM   #1
cilbuper
Member
 
Registered: Mar 2008
Posts: 141

Rep: Reputation: 0
Bash history - multiple windows and multiple tabs. how to keep things straight?


I'm getting really frustrated here. I keep trying to use history and it isn't working. I use MANY terminal windows b/c they are often doing something and I like to watch the progress at times (and I don't know how to use the background feature TBH) but when I do a history of the same username I don't see the same thing from tab to tab. I'm not sure how to figure out when the history gets "stuck" to a tab and when there are multiple tabs, how do they track/follow the history of a specific "history file" (IDK what to call the history of a specific tab)..

Is there a way to make this easier to work with other than the default setting? This isn't a major issue, but I'm trying to make this install (first primary Linux system) as streamlined as possible and this is a moderate issue.
 
Old 12-28-2014, 03:48 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by cilbuper View Post
(..) when I do a history of the same username I don't see the same thing from tab to tab. I'm not sure how to figure out when the history gets "stuck" to a tab and when there are multiple tabs, how do they track/follow the history of a specific "history file"
Add these lines to your ~/.bashrc then log out completely and log in again:
Code:
shopt -q -s histappend >/dev/null 2>&1
export PROMPT_COMMAND='history -a' >/dev/null 2>&1
To test open two terminal windows and type:
Code:
date; echo; ls
in one window then press enter.
In the other terminal window press up arrow key one time.
Notice the first history line is what you typed in the other window.
 
Old 01-01-2015, 11:57 AM   #3
Miati
Member
 
Registered: Dec 2014
Distribution: Linux Mint 17.*
Posts: 326

Rep: Reputation: 106Reputation: 106
You might try terminator. It's best feature is to cleanly split up terminal windows to as many as you want

I find this much more easier then using a abundance of tabs!
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2015-01-01 09:55:35.jpg
Views:	29
Size:	60.6 KB
ID:	17259  
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash Question(for loop): How to Zip multiple files under multiple directories Znrall Linux - General 2 08-01-2012 01:52 PM
Bash quesion - scp on multiple hosts to multiple directories in each one mierea.ciprian Programming 2 06-22-2012 12:27 PM
tcsh: can you save the history from multiple shells to one history file? BrianK General 2 04-23-2009 05:19 AM
Getting things straight: Apache, SSL, Multiple External IPs / Internal IPs robin.com.au Linux - Server 21 10-13-2007 11:39 PM
Multiple tabs in same window using Qt chmeherkch Programming 1 10-30-2003 02:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration