Re: Feature: Easily remove current command from history

2016-01-11 Thread Chet Ramey
On 1/8/16 4:01 PM, Piotr Grzybowski wrote: > On Thu, Jan 7, 2016 at 9:32 PM, Chet Ramey wrote: >> On 1/5/16 8:08 AM, Greg Wooledge wrote: >> >>> imadev:~$ zap me >>> bash: zap: command not found >>> imadev:~$ history -d -1 >>> bash: history: -1: history position out of range >>> imadev:~$ history

Re: Feature: Easily remove current command from history

2016-01-08 Thread Piotr Grzybowski
On Thu, Jan 7, 2016 at 9:32 PM, Chet Ramey wrote: > On 1/5/16 8:08 AM, Greg Wooledge wrote: > >> imadev:~$ zap me >> bash: zap: command not found >> imadev:~$ history -d -1 >> bash: history: -1: history position out of range >> imadev:~$ history -d end >> bash: history: end: history position out o

Re: Feature: Easily remove current command from history

2016-01-07 Thread Chet Ramey
On 1/5/16 8:08 AM, Greg Wooledge wrote: > imadev:~$ zap me > bash: zap: command not found > imadev:~$ history -d -1 > bash: history: -1: history position out of range > imadev:~$ history -d end > bash: history: end: history position out of range > > Allowing a negative offset to refer to the last

Re: Feature: Easily remove current command from history

2016-01-05 Thread Dennis Williamson
On Mon, Jan 4, 2016 at 4:35 PM, Dennis Williamson < dennistwilliam...@gmail.com> wrote: > > > On Mon, Jan 4, 2016 at 4:05 PM, Dennis Williamson < > dennistwilliam...@gmail.com> wrote: > >> >> >> On Mon, Jan 4, 2016 at 3:07 PM, Eduardo A. Bustamante López < >> dual...@gmail.com> wrote: >> >>> Take

Re: Feature: Easily remove current command from history

2016-01-05 Thread Greg Wooledge
On Mon, Jan 04, 2016 at 04:35:17PM -0600, Dennis Williamson wrote: > > Just bind your own keystroke to a function which uses history -d: > > > > histdel() { > > local last_command histline > > > > last_command=$(history 1) etc. Hmm. Why isn't this easier...? imadev:~$ help history .

Re: Feature: Easily remove current command from history

2016-01-04 Thread Dennis Williamson
On Mon, Jan 4, 2016 at 4:05 PM, Dennis Williamson < dennistwilliam...@gmail.com> wrote: > > > On Mon, Jan 4, 2016 at 3:07 PM, Eduardo A. Bustamante López < > dual...@gmail.com> wrote: > >> Take into account that many options have been provided (history -d, the >> space >> prefix, even editing .bas

Re: Feature: Easily remove current command from history

2016-01-04 Thread Dennis Williamson
On Mon, Jan 4, 2016 at 3:07 PM, Eduardo A. Bustamante López < dual...@gmail.com> wrote: > Take into account that many options have been provided (history -d, the > space > prefix, even editing .bash_history yourself). > > But you request a single key stroke to do this... why? > > If you enter a pa

Re: Feature: Easily remove current command from history

2016-01-04 Thread Eduardo A . Bustamante López
Take into account that many options have been provided (history -d, the space prefix, even editing .bash_history yourself). But you request a single key stroke to do this... why? If you enter a password by mistake in your shell, and it gets recorded, then you go and clean up. It's not hard to do.

Re: Feature: Easily remove current command from history

2016-01-04 Thread Victor Porton
On Mon, 2016-01-04 at 15:37 -0500, Greg Wooledge wrote: > On Mon, Jan 04, 2016 at 09:30:37PM +0100, Piotr Grzybowski wrote: > > On Mon, Jan 4, 2016 at 9:19 PM, Victor Porton > > wrote: > > > It is important for security: > > > > > > It should be easy to remove lines with passwords and potentially

Re: Feature: Easily remove current command from history

2016-01-04 Thread Greg Wooledge
On Mon, Jan 04, 2016 at 09:30:37PM +0100, Piotr Grzybowski wrote: > On Mon, Jan 4, 2016 at 9:19 PM, Victor Porton wrote: > > It is important for security: > > > > It should be easy to remove lines with passwords and potentially harmful > > commands (like sudo with rm). > > never put your password

Re: Feature: Easily remove current command from history

2016-01-04 Thread Andreas Schwab
Victor Porton writes: > It should be easy to remove lines with passwords and potentially > harmful commands (like sudo with rm). C-a C-k Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely

Re: Feature: Easily remove current command from history

2016-01-04 Thread Piotr Grzybowski
On Mon, Jan 4, 2016 at 9:19 PM, Victor Porton wrote: > It is important for security: > > It should be easy to remove lines with passwords and potentially harmful > commands (like sudo with rm). never put your passwords in plain text in commands, thats important for security. If, for some reasons,

Re: Feature: Easily remove current command from history

2016-01-04 Thread Victor Porton
On Mon, 2016-01-04 at 15:14 -0500, Chet Ramey wrote: > On 1/4/16 3:09 PM, Victor Porton wrote: > > On Mon, 2016-01-04 at 14:59 -0500, Chet Ramey wrote: > > > On 1/4/16 1:30 PM, por...@narod.ru por...@narod.ru> > > > wrote: > > > > > > > Bash Version: 4.3 Patch Level: 42 Release Status: release > >

Re: Feature: Easily remove current command from history

2016-01-04 Thread Chet Ramey
On 1/4/16 3:09 PM, Victor Porton wrote: > On Mon, 2016-01-04 at 14:59 -0500, Chet Ramey wrote: >> On 1/4/16 1:30 PM, por...@narod.ru wrote: >> >>> Bash Version: 4.3 Patch Level: 42 Release Status: release Description: >>> There should be an easy way to remove the currently

Re: Feature: Easily remove current command from history

2016-01-04 Thread Victor Porton
On Mon, 2016-01-04 at 14:59 -0500, Chet Ramey wrote: > On 1/4/16 1:30 PM, por...@narod.ru wrote: > > > Bash Version: 4.3 > > Patch Level: 42 > > Release Status: release > > > > Description: > > > > There should be an easy way to remove the currently selected > > command > > from the history. >

Re: Feature: Easily remove current command from history

2016-01-04 Thread Chet Ramey
On 1/4/16 1:30 PM, por...@narod.ru wrote: > Bash Version: 4.3 > Patch Level: 42 > Release Status: release > > Description: > > There should be an easy way to remove the currently selected command > from the history. Easier than `history -d'? -- ``The lyf so short, the craft so long to lerne.'

Feature: Easily remove current command from history

2016-01-04 Thread porton
Configuration Information [Automatically generated, do not change]: Machine: i586 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='ba