From abc@ai1.anchorage.mtaonline.net  Sun Jul 20 18:13:08 2003
Return-Path: <abc@ai1.anchorage.mtaonline.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 33EF537B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 20 Jul 2003 18:13:08 -0700 (PDT)
Received: from ai1.anchorage.mtaonline.net (ai1.anchorage.mtaonline.net [12.17.140.247])
	by mx1.FreeBSD.org (Postfix) with ESMTP id CC9A443F85
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 20 Jul 2003 18:13:06 -0700 (PDT)
	(envelope-from abc@ai1.anchorage.mtaonline.net)
Received: from en26.ai1.anchorage.mtaonline.net (root@printer [192.168.0.26])
	by ai1.anchorage.mtaonline.net (8.12.6/8.12.6) with ESMTP id h6L1CtXq005382
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 20 Jul 2003 17:12:57 -0800 (AKDT)
	(envelope-from abc@ai1.anchorage.mtaonline.net)
Received: (from abc@localhost)
	by en26.ai1.anchorage.mtaonline.net (8.12.8p1/8.12.6) id h6L1EYvM039412;
	Mon, 21 Jul 2003 01:14:34 GMT
	(envelope-from abc@ai1.anchorage.mtaonline.net)
Message-Id: <200307210114.h6L1EYvM039412@en26.ai1.anchorage.mtaonline.net>
Date: Mon, 21 Jul 2003 01:14:34 GMT
From: abc@ai1.anchorage.mtaonline.net
Reply-To:
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: sh, redundant history

>Number:         54683
>Category:       bin
>Synopsis:       sh(1) redundant history
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jilles
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 20 18:20:10 PDT 2003
>Closed-Date:    Wed Sep 01 21:54:48 UTC 2010
>Last-Modified:  Wed Sep 01 21:54:48 UTC 2010
>Originator:     Joe Public
>Release:        i386 FreeBSD 4.8-RELEASE
>Organization:
no org
>Environment:
FreeBSD en26 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Thu Apr 17 21:11:57 AKDT 2003     root@en26:/usr/src/sys/compile/MYKERN  i386
>Description:
sh history stores consecutive redundant lines for no reason.
>How-To-Repeat:
enter the same command many times at a sh prompt.
>Fix:
don't enter command into history if equal to last command.
                it is a minor irritant to scroll back thru sh history stepping
                past multiple consecutive and redundant lines, and there is no
                good reason for storing multiple consecutive/redundant lines.
>Release-Note:
>Audit-Trail:

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/54683: commit references a PR
Date: Sun,  1 Aug 2010 16:38:00 +0000 (UTC)

 Author: jilles
 Date: Sun Aug  1 16:37:51 2010
 New Revision: 210736
 URL: http://svn.freebsd.org/changeset/base/210736
 
 Log:
   sh: Do not enter consecutive duplicates into the history.
   
   This simply sets a flag in libedit. It has a shortcoming in that it does not
   apply to multi-line commands.
   
   Note that a configuration option for this is not going to happen, but always
   having this seems better than not having it. NetBSD has done the same.
   
   PR:		bin/54683
   Obtained from:	NetBSD
   MFC after:	1 month
 
 Modified:
   head/bin/sh/histedit.c
 
 Modified: head/bin/sh/histedit.c
 ==============================================================================
 --- head/bin/sh/histedit.c	Sun Aug  1 15:55:49 2010	(r210735)
 +++ head/bin/sh/histedit.c	Sun Aug  1 16:37:51 2010	(r210736)
 @@ -168,6 +168,7 @@ sethistsize(hs)
  		   (histsize = atoi(hs)) < 0)
  			histsize = 100;
  		history(hist, &he, H_SETSIZE, histsize);
 +		history(hist, &he, H_SETUNIQUE, 1);
  	}
  }
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: jilles 
State-Changed-When: Sun Aug 1 16:42:43 UTC 2010 
State-Changed-Why:  
Fixed in 9-CURRENT. 


Responsible-Changed-From-To: freebsd-bugs->jilles 
Responsible-Changed-By: jilles 
Responsible-Changed-When: Sun Aug 1 16:42:43 UTC 2010 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=54683 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/54683: commit references a PR
Date: Wed,  1 Sep 2010 19:49:37 +0000 (UTC)

 Author: jilles
 Date: Wed Sep  1 19:49:24 2010
 New Revision: 212111
 URL: http://svn.freebsd.org/changeset/base/212111
 
 Log:
   MFC r210736: sh: Do not enter consecutive duplicates into the history.
   
   This simply sets a flag in libedit. It has a shortcoming in that it does not
   apply to multi-line commands.
   
   Note that a configuration option for this is not going to happen, but always
   having this seems better than not having it. NetBSD has done the same.
   
   PR:		bin/54683
   Obtained from:	NetBSD
 
 Modified:
   stable/8/bin/sh/histedit.c
 Directory Properties:
   stable/8/bin/sh/   (props changed)
 
 Modified: stable/8/bin/sh/histedit.c
 ==============================================================================
 --- stable/8/bin/sh/histedit.c	Wed Sep  1 19:36:06 2010	(r212110)
 +++ stable/8/bin/sh/histedit.c	Wed Sep  1 19:49:24 2010	(r212111)
 @@ -157,6 +157,7 @@ sethistsize(hs)
  		   (histsize = atoi(hs)) < 0)
  			histsize = 100;
  		history(hist, &he, H_SETSIZE, histsize);
 +		history(hist, &he, H_SETUNIQUE, 1);
  	}
  }
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: jilles 
State-Changed-When: Wed Sep 1 21:54:48 UTC 2010 
State-Changed-Why:  
Added in 8.x/9.x, no MFC to 7.x planned. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=54683 
>Unformatted:
