Replies: 4 comments 5 replies
-
|
The themes To identify what causes the history sharing, could you provide the output of the following command? $ declare -p PROMPT_COMMAND _omb_util_prompt_command |
Beta Was this translation helpful? Give feedback.
-
|
I've tried to reproduce my steps to find out where the plugin So, after that, I disabled OMB completely to ensure 100% that it came with enabling it, and yes: As soon as OMB is not sourced from my With OMB enabled, PS: I also tried to choose |
Beta Was this translation helpful? Give feedback.
-
|
I now found the following: PROMPT_COMMAND="history -a; history -n; "I now did some trial & error and found, that as soon as one of the two lines in
When I comment out both, shells are back to expected history behavior. |
Beta Was this translation helpful? Give feedback.
-
|
Even more background: I found out that the element, which is responsible for my shells to have those two history commands ( $ hstr --show-configuration
# HSTR configuration - add this to ~/.bashrc
alias hh=hstr # hh to be alias for hstr
export HSTR_CONFIG=hicolor # get more colors
shopt -s histappend # append new history items to .bash_history
export HISTCONTROL=ignorespace # leading space hides commands from history
export HISTFILESIZE=10000 # increase history file size (default is 500)
export HISTSIZE=${HISTFILESIZE} # increase history size (default is 500)
# ensure synchronization between bash memory and history file
export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"
# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)
if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\C-a hstr -- \C-j"'; fi
# if this is interactive shell, then bind 'kill last command' to Ctrl-x k
if [[ $- =~ .*i.* ]]; then bind '"\C-xk": "\C-a hstr -k \C-j"'; fiInstall instructions say to have these lines in any of the shell source files; note the line exporting |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
after installing OMB, my shell history behaves weird: It seems like the history is shared between sessions now. When I open two iTerm2 windows and type something to the first one, that typing ends up in my shell history (pressing up key) of the other window.
I recorded a short screencast to demonstrate this, in which you also see the keys pressed:
https://youtu.be/iaW0mLbUhMc
This pretty much collides with what I am used to working with terminals and since this is active, it happened more than once that I execute a command in the wrong shell and context, already. And I consider it a matter of time before I accidentially cause harm with this.
So I'd like to disable that.
For "Oh-my-ZSH", I found this an often addressed thing already (Google for "oh my zsh disable shared history"). There, this can be disabled using
unsetopt share_history, according to this issue: ohmyzsh#2537But I did not find something similar for Oh-My-Bash.
I am using OMB with:
agnostercompletions=(git composer ssh)aliases=(general)plugins=(git bashmarks poetry)Can someone point me to the correct resource or explain how to best do this, please?
Beta Was this translation helpful? Give feedback.
All reactions