Re: [Suggestion] Flush command history to a "backup" file periodically

2023-01-20 Thread Chet Ramey
On 1/19/23 7:08 PM, Peter wrote: Currently, in the event bash or something below it crashes, that session's command history is lost. It would be nice if bash saved it somewhere periodically, it doesn't have to be too often, let's say on every second command. Use PROMPT_COMMAND

Re: [Suggestion] Flush command history to a "backup" file periodically

2023-01-19 Thread Greg Wooledge
On Fri, Jan 20, 2023 at 12:08:36AM +, Peter wrote: > Currently, in the event bash or something below it crashes, that > session's command history is lost. > It would be nice if bash saved it somewhere periodically, it doesn't > have to be too often, let's say on eve

[Suggestion] Flush command history to a "backup" file periodically

2023-01-19 Thread Peter
Currently, in the event bash or something below it crashes, that session's command history is lost. It would be nice if bash saved it somewhere periodically, it doesn't have to be too often, let's say on every second command. That way, history could be restored from the "b

Re: When searching in command history, highlighting is missing the first character

2021-06-21 Thread Teemu Leisti
So my bug report can be disregarded. -- Teemu Leisti On Mon, 21 Jun 2021 at 17:10, Chet Ramey wrote: > > On 6/20/21 12:51 PM, Teemu Leisti wrote: > > > Bash Version: 5.1 > > Patch Level: 4 > > Release Status: release > > > > Description: > > When using c

Re: When searching in command history, highlighting is missing the first character

2021-06-21 Thread Chet Ramey
On 6/20/21 12:51 PM, Teemu Leisti wrote: Bash Version: 5.1 Patch Level: 4 Release Status: release Description: When using ctrl-R to search in the command history, Bash highlights the searched string, but not its first character. Repeat-By: 1. Open Bash, and command: abcdef 2. Click Ctrl-R

Re: When searching in command history, highlighting is missing the first character

2021-06-20 Thread Greg Wooledge
On Sun, Jun 20, 2021 at 07:51:03PM +0300, Teemu Leisti wrote: > Repeat-By: > 1. Open Bash, and command: abcdef > 2. Click Ctrl-R, and type: bcde > Expected behavior: The command "abcdef" is shown on the command line, > and "bcde" is highlighted. > Observed behavior: The command "abcdef" is shown on

When searching in command history, highlighting is missing the first character

2021-06-20 Thread Teemu Leisti
7 14:22:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 5.1 Patch Level: 4 Release Status: release Description: When using ctrl-R to search in the command history, Bash highlights the searched string, but not its first character. Repeat-By: 1. Open Bash

Re: multi-line command history does not work when new terminal opened

2020-08-17 Thread Chet Ramey
On 8/16/20 2:39 AM, Hyunho Cho wrote: > Bash Version: 5.0 > Patch Level: 17 > Release Status: release > > > > > I have enabled the shell options for multi-line command history like this > &g

multi-line command history does not work when new terminal opened

2020-08-15 Thread Hyunho Cho
:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 5.0 Patch Level: 17 Release Status: release I have enabled the shell options for multi-line command history like this shopt -s

Re: Shell command history messing up when switching windows/slices in tmux

2019-04-10 Thread Chet Ramey
On 4/10/19 3:44 AM, Matej Vargovčík wrote: > Dear Sirs, > I had a problem losing bash history when switching between terminals in > tmux. I reported the issue in tmux, but the developers have told me that > it's a bash problem and I should report it here. Please see this thread for > more details:

Re: Shell command history messing up when switching windows/slices in tmux

2019-04-10 Thread Greg Wooledge
On Wed, Apr 10, 2019 at 09:44:34AM +0200, Matej Vargovčík wrote: > I had a problem losing bash history when switching between terminals in > tmux. I reported the issue in tmux, but the developers have told me that > it's a bash problem and I should report it here. Please see this thread for > more

Shell command history messing up when switching windows/slices in tmux

2019-04-10 Thread Matej Vargovčík
Dear Sirs, I had a problem losing bash history when switching between terminals in tmux. I reported the issue in tmux, but the developers have told me that it's a bash problem and I should report it here. Please see this thread for more details: https://github.com/tmux/tmux/issues/1671 Thank you fo

Re: edit-and-execute-command, history and PS1

2016-06-08 Thread Chet Ramey
On 6/2/16 11:28 AM, Jure Oder wrote: > Dear all, > > I have noticed strange behaviour if my PS1 variable contains "the history > number of this command" (\!). When the prompt returns after invoking the > edit-and-execute-command (C-xC-e) the history number is not increased. If I > then press retur

edit-and-execute-command, history and PS1

2016-06-02 Thread Jure Oder
Dear all, I have noticed strange behaviour if my PS1 variable contains "the history number of this command" (\!). When the prompt returns after invoking the edit-and-execute-command (C-xC-e) the history number is not increased. If I then press return, the history number is increased by two (or mor

Re: Saving command history for non-interactive shell

2012-03-19 Thread Chet Ramey
On 3/19/12 8:39 AM, Greg Wooledge wrote: > On Fri, Mar 16, 2012 at 06:15:35PM -0400, Chet Ramey wrote: >> Turn on history with `set -o history' and set HISTFILE and HISTSIZE as you >> like. You can probably set some of the right variables in .ssh/environment >> and set BASH_ENV to a file that wil

Re: Saving command history for non-interactive shell

2012-03-19 Thread dethrophes
Am 19.03.2012 13:39, schrieb Greg Wooledge: On Fri, Mar 16, 2012 at 06:15:35PM -0400, Chet Ramey wrote: There is nothing stopping you from using history in a non-interactive shell -- it's just not enabled by default. Turn on history with `set -o history' and set HISTFILE and HISTSIZE as you lik

Re: Saving command history for non-interactive shell

2012-03-19 Thread Greg Wooledge
On Fri, Mar 16, 2012 at 06:15:35PM -0400, Chet Ramey wrote: > There is nothing stopping you from using history in a non-interactive > shell -- it's just not enabled by default. > > Turn on history with `set -o history' and set HISTFILE and HISTSIZE as you > like. You can probably set some of the

Re: Saving command history for non-interactive shell

2012-03-17 Thread dethrophes
Am 17.03.2012 22:10, schrieb dethrophes: Am 16.03.2012 15:56, schrieb Greg Wooledge: On Fri, Mar 16, 2012 at 02:33:35PM +, Lars Peterson wrote: Is there a way to configure bash so that commands from a non-interactive shell are preserved in the history? I'm more interested in saving command

Re: Saving command history for non-interactive shell

2012-03-17 Thread dethrophes
Am 16.03.2012 15:56, schrieb Greg Wooledge: On Fri, Mar 16, 2012 at 02:33:35PM +, Lars Peterson wrote: Is there a way to configure bash so that commands from a non-interactive shell are preserved in the history? I'm more interested in saving commands invoked via ssh vs shell scrpts. From C

Re: Saving command history for non-interactive shell

2012-03-16 Thread Chet Ramey
On 3/16/12 12:39 PM, Lars Peterson wrote: > Thanks Greg. > > I get what you're saying about the futility of recording everything users do. > And I'm not interested in setting up a big brother / spy machine that will > invoke the wrath of the Unix gods. > > I'm not interested in security here...

RE: Saving command history for non-interactive shell

2012-03-16 Thread Lars Peterson
Peterson Cc: bug-bash@gnu.org Subject: Re: Saving command history for non-interactive shell On Fri, Mar 16, 2012 at 02:33:35PM +, Lars Peterson wrote: > Is there a way to configure bash so that commands from a > non-interactive shell are preserved in the history? I'm more > inte

Re: Saving command history for non-interactive shell

2012-03-16 Thread Greg Wooledge
On Fri, Mar 16, 2012 at 02:33:35PM +, Lars Peterson wrote: > Is there a way to configure bash so that commands from a non-interactive > shell are preserved in the history? I'm more interested in saving commands > invoked via ssh vs shell scrpts. >From CHANGES, for bash 4.1: l. There is a new

Saving command history for non-interactive shell

2012-03-16 Thread Lars Peterson
Hello, Is there a way to configure bash so that commands from a non-interactive shell are preserved in the history? I'm more interested in saving commands invoked via ssh vs shell scrpts. I did not succeed when trying a few things to "force" interactive mode such as: # invoke bash as a login s

Re: How to enable infinite command history

2012-02-01 Thread lina
You mean the bash history fliter, can flit away those repeated more than twice and those cd .. and something basic.

Re: How to enable infinite command history

2012-02-01 Thread suvayu ali
On Tue, Jan 31, 2012 at 18:23, Dennis Williamson wrote: > I have the same use case. Try one of my logging functions at > http://stackoverflow.com/945288/26428 That link doesn't work for me, but I think you meant this question:

Re: How to enable infinite command history

2012-01-31 Thread Dennis Williamson
eally at my wits' end with > > > this. > > > > > > How do I enable infinite command history ? > > > > > > One simple suggestion I've seen online is to set HISTSIZE and > > > HISTFILESIZE to a large number. This is not what I need,

Re: How to enable infinite command history

2012-01-31 Thread DJ Mills
s' end with >> > this. >> > >> > How do I enable infinite command history ? >> > >> > One simple suggestion I've seen online is to set HISTSIZE and >> > HISTFILESIZE to a large number. This is not what I need, I want >> > g

Re: How to enable infinite command history

2012-01-31 Thread Ivan Yosifov
On Mon, 2012-01-30 at 20:16 +0200, Pierre Gaston wrote: > On Mon, Jan 30, 2012 at 8:01 PM, Ivan Yosifov wrote: > > Hi everyone, > > > > I got an admittedly basic question but I'm really at my wits' end with > > this. > > > > How do I enable infinit

(low priority) BUG: too large history=nohistory? (was: Re: How to enable infinite command history)

2012-01-30 Thread Linda Walsh
It seems there is a a platform dependent bug somewhere: > HISTSIZE=$(((3**15)) echo $HISTSIZE 1000 --- but you have no history... Pierre Gaston wrote: Setting HISTFILESIZE to 2147483647 gives you 68 years of history at one command per seconds (I hope I got my math right) with say

Re: How to enable infinite command history

2012-01-30 Thread Pierre Gaston
On Mon, Jan 30, 2012 at 8:01 PM, Ivan Yosifov wrote: > Hi everyone, > > I got an admittedly basic question but I'm really at my wits' end with > this. > > How do I enable infinite command history ? > > One simple suggestion I've seen online is to set HISTSI

How to enable infinite command history

2012-01-30 Thread Ivan Yosifov
Hi everyone, I got an admittedly basic question but I'm really at my wits' end with this. How do I enable infinite command history ? One simple suggestion I've seen online is to set HISTSIZE and HISTFILESIZE to a large number. This is not what I need, I want genuinely uncons

Re: Prompt - cursor position - command history display problem

2009-10-19 Thread Chet Ramey
t; cyclops4 2.6.21-1.3194.fc7 #1 SMP Wed May 23 22:47:07 EDT 2007 x86_64 > x86_64 x86_64 GNU/Linux > > Machine Type: x86_64-unknown-linux-gnu > > Bash > Version: 4.0 > > Patch Level: 28 > > Release Status: release > > Description: > > With > a co

Re: Prompt - cursor position - command history display problem

2009-10-18 Thread Chet Ramey
Timothy James Erlenmeyer wrote: > Bash Version: 4.0 > Patch Level: 28 > Release Status: release > > Description: > > With > a color prompt, long directory names, and/or long command lines, scrolling > through the command history often causes the cursor to be in the w

Prompt - cursor position - command history display problem

2009-10-17 Thread Timothy James Erlenmeyer
-unknown-linux-gnu Bash Version: 4.0 Patch Level: 28 Release Status: release Description: With a color prompt, long directory names, and/or long command lines, scrolling through the command history often causes the cursor to be in the wrong position, the prompt to loose color and remnants of previo

Re: Screen Corruption when browsing Command History with Custom Prompt

2008-09-09 Thread Ashley Wilson
On Wed, Sep 10, 2008 at 3:02 AM, Matthew Woehlke <[EMAIL PROTECTED]> wrote: > Ashley Wilson wrote: >> >> No, Wait! That's not the issue!! This works just fine: >> >> PS1="\n\[\e[0;32m\]\u: \w\n# \[\e[m\]" >> >> So, all I had to do was to add '\[' before and '\]' after the coloring >> sequen

Re: Screen Corruption when browsing Command History with Custom Prompt

2008-09-09 Thread Matthew Woehlke
Ashley Wilson wrote: No, Wait! That's not the issue!! This works just fine: PS1="\n\[\e[0;32m\]\u: \w\n# \[\e[m\]" So, all I had to do was to add '\[' before and '\]' after the coloring sequence to fix everything! Of course it works; this is exactly what Chet was trying to tell you.

Re: Screen Corruption when browsing Command History with Custom Prompt

2008-09-09 Thread Ashley Wilson
as already in the default > .bashrc !! > > Sorry for the trouble.. > > -- > Regards, > Ashley. > > > On Tue, Sep 9, 2008 at 11:49 PM, Chet Ramey <[EMAIL PROTECTED]> wrote: >> Ashley Wilson wrote: >> >>> Repeat-By: >>> >>>

Re: Screen Corruption when browsing Command History with Custom Prompt

2008-09-09 Thread Ashley Wilson
on wrote: > >> Repeat-By: >> >>Set a custom prompt using the PS1 variable as follows: >> >> PS1="\n\e[0;31m\u: \w\n# \e[m" >> >>Then, browse command history using up/down keys. > > As the documentation state

Re: Screen Corruption when browsing Command History with Custom Prompt

2008-09-09 Thread Chet Ramey
Ashley Wilson wrote: Repeat-By: Set a custom prompt using the PS1 variable as follows: PS1="\n\e[0;31m\u: \w\n# \e[m" Then, browse command history using up/down keys. As the documentation states, you need to bracket sequences of no

Screen Corruption when browsing Command History with Custom Prompt

2008-09-09 Thread Ashley Wilson
From: root To: bug-bash@gnu.org,[EMAIL PROTECTED] Subject: Screen Corruption when browsing Command History with Custom Prompt Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOST

Re: bash-3.2 regression: command history display with coloured PS1.

2007-03-26 Thread Peter Volkov
On Пнд, 2007-03-26 at 17:35 +0200, Andreas Schwab wrote: > Peter Volkov <[EMAIL PROTECTED]> writes: > > Steps to reproduce: > > PS1="\e[36m[\e[34m\u\e[0m \e[32m\w\e[36m] \\$\e[0m " > > This is broken. You need to bracket escape sequences with \[ \]. Eh. Right. Sorry for noise. -- Peter. sign

Re: bash-3.2 regression: command history display with coloured PS1.

2007-03-26 Thread Andreas Schwab
Peter Volkov <[EMAIL PROTECTED]> writes: > Steps to reproduce: > PS1="\e[36m[\e[34m\u\e[0m \e[32m\w\e[36m] \\$\e[0m " This is broken. You need to bracket escape sequences with \[ \]. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürn

bash-3.2 regression: command history display with coloured PS1.

2007-03-26 Thread Peter Volkov
Hello. The following bug (http://bugs.gentoo.org/172260) == Steps to reproduce: PS1="\e[36m[\e[34m\u\e[0m \e[32m\w\e[36m] \\$\e[0m " LC_ALL="en_US.UTF8" ls echo ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz Bash 3.1.* works correctl

Re: command history

2006-02-24 Thread Chris F.A. Johnson
On Fri, 17 Feb 2006, [EMAIL PROTECTED] wrote: hi everybody this is my first post, and i'm not sure whether it even belongs here... is it the shell which handles the command history? if so, here my feature request: it would be very convenient, to be able and narrow down the search i

command history

2006-02-24 Thread mwild
hi everybody this is my first post, and i'm not sure whether it even belongs here... is it the shell which handles the command history? if so, here my feature request: it would be very convenient, to be able and narrow down the search in the command history by typing a few characters, in