summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2012-03-04 20:13:20 -0500
committerEliot Horowitz <eliot@10gen.com>2012-03-04 20:13:20 -0500
commit446f597cf423d62df0b4a6c292b57da1f382649c (patch)
tree46f5b2d87d884cb74f5964e0b6774bdad2491667
parentabb62840567ae8e342fcd07c845765f7fca9e7a8 (diff)
downloadmongo-446f597cf423d62df0b4a6c292b57da1f382649c.tar.gz
Dont add addUser lines to shell history SERVER-3768
Conflicts: shell/dbshell.cpp
-rw-r--r--shell/dbshell.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/dbshell.cpp b/shell/dbshell.cpp
index 443973f1c68..34f2a346436 100644
--- a/shell/dbshell.cpp
+++ b/shell/dbshell.cpp
@@ -126,8 +126,11 @@ void shellHistoryAdd( const char * line ) {
return;
lastLine = line;
- if ((strstr(line, ".auth")) == NULL)
+ if ( strstr( line, ".auth") == NULL &&
+ strstr( line, ".addUser") == NULL )
+ {
linenoiseHistoryAdd( line );
+ }
#endif
}