Set unique mode for the history, so that repeating a command doesn't
authorMatthias Schmidt <matthias@dragonflybsd.org>
Wed, 13 Feb 2008 15:13:37 +0000 (15:13 +0000)
committerMatthias Schmidt <matthias@dragonflybsd.org>
Wed, 13 Feb 2008 15:13:37 +0000 (15:13 +0000)
spam the history.

Obtained-from: NetBSD

bin/sh/histedit.c

index 208a283..797685a 100644 (file)
@@ -35,7 +35,7 @@
  *
  * @(#)histedit.c      8.2 (Berkeley) 5/4/95
  * $FreeBSD: src/bin/sh/histedit.c,v 1.29 2006/08/04 07:56:31 yar Exp $
- * $DragonFly: src/bin/sh/histedit.c,v 1.11 2007/01/14 17:29:58 pavalos Exp $
+ * $DragonFly: src/bin/sh/histedit.c,v 1.12 2008/02/13 15:13:37 matthias Exp $
  */
 
 #include <sys/param.h>
@@ -168,6 +168,7 @@ sethistsize(const char *hs)
                   (histsize = atoi(hs)) < 0)
                        histsize = 100;
                history(hist, &he, H_SETSIZE, histsize);
+               history(hist, &he, H_SETUNIQUE, 1);
        }
 }