Friday, April 26, 2024
 Popular · Latest · Hot · Upcoming
17
rated 0 times [  17] [ 0]  / answers: 1 / hits: 7356  / 2 Years ago, thu, april 7, 2022, 3:58:17

I use a bash script to start gnome-terminal with multiple tabs, each tab using a different profile, working directory, and in some cases executing a command within the tab.



In this situation, I'd like for the up arrow key to retrieve commands that were used in a specific tab. Is this possible?


More From » bash

 Answers
2

I suppose you can use a gnome-terminal custom command for each profile, for example



bash -c 'PROFILE=default_profile exec bash'


or



bash -c 'PROFILE=screen_profile exec screen -U'


or similar.



Then in ~/.bashrc



if [[ -n $PROFILE ]]; then
HISTFILE=~/.bash_history."$PROFILE"
fi

[#41020] Thursday, April 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
uccase

Total Points: 473
Total Questions: 100
Total Answers: 110

Location: Anguilla
Member since Sun, Jan 29, 2023
1 Year ago
;