Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Sep 2010 19:49:24 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r212111 - stable/8/bin/sh
Message-ID:  <201009011949.o81JnOqP078402@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009011949.o81JnOqP078402>