Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
adc1b503
Commit
adc1b503
authored
May 17, 2016
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2567 from fjl/console-history-exclude
cmd/geth: fix console history exclusion
parents
fe532a98
86da6feb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
js.go
cmd/geth/js.go
+3
-6
No files found.
cmd/geth/js.go
View file @
adc1b503
...
...
@@ -42,7 +42,6 @@ import (
var
(
passwordRegexp
=
regexp
.
MustCompile
(
"personal.[nu]"
)
leadingSpace
=
regexp
.
MustCompile
(
"^ "
)
onlyws
=
regexp
.
MustCompile
(
"^
\\
s*$"
)
exit
=
regexp
.
MustCompile
(
"^
\\
s*exit
\\
s*;*
\\
s*$"
)
)
...
...
@@ -361,7 +360,7 @@ func (self *jsre) interactive() {
str
+=
input
+
"
\n
"
self
.
setIndent
()
if
indentCount
<=
0
{
if
mustLogIn
History
(
str
)
{
if
!
excludeFrom
History
(
str
)
{
utils
.
Stdin
.
AppendHistory
(
str
[
:
len
(
str
)
-
1
])
}
self
.
parseInput
(
str
)
...
...
@@ -371,10 +370,8 @@ func (self *jsre) interactive() {
}
}
func
mustLogInHistory
(
input
string
)
bool
{
return
len
(
input
)
==
0
||
passwordRegexp
.
MatchString
(
input
)
||
!
leadingSpace
.
MatchString
(
input
)
func
excludeFromHistory
(
input
string
)
bool
{
return
len
(
input
)
==
0
||
input
[
0
]
==
' '
||
passwordRegexp
.
MatchString
(
input
)
}
func
(
self
*
jsre
)
withHistory
(
datadir
string
,
op
func
(
*
os
.
File
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment