Monday, April 29, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 762  / 1 Year ago, fri, december 23, 2022, 9:05:27

I'm trying to create a profile in gnome-terminal that doesn't store bash history.



The easiest way to do that is to run export HISTIGNORE="*", but there is one problem, gome-terminal is executing command before running bash, so this variable is being overwritten.



I was thinking about using .profile or .bashrc, but I don't want it to execute every time bash starts and I don't know how to determine which profile is being used by gnome-terminal from within terminal.


More From » command-line

 Answers
1

Have you tried using env to run the shell in a custom environment e.g. /usr/bin/env HISTIGNORE='*' /bin/bash from the gnome-terminal Title and Command tab?



gnome-terminal custom command



This seems to work for me - although I can't help feeling there's a more efficient way that doesn't involve testing each command against the wildcard.


[#23338] Saturday, December 24, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
variark

Total Points: 82
Total Questions: 114
Total Answers: 122

Location: Sweden
Member since Mon, May 8, 2023
1 Year ago
variark questions
Wed, Nov 3, 21, 13:30, 3 Years ago
Sun, Jan 8, 23, 16:05, 1 Year ago
Thu, Dec 15, 22, 02:10, 1 Year ago
Sun, Jun 26, 22, 12:20, 2 Years ago
Tue, Dec 14, 21, 15:40, 2 Years ago
;