File tree 2 files changed +4
-2
lines changed
client/components/main/Main/Database/Content
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import React from 'react' ;
4
4
import commands from 'redis-commands' ;
5
+ import splitargs from 'redis-splitargs' ;
5
6
6
7
require ( './Terminal.scss' ) ;
7
8
@@ -12,13 +13,13 @@ class Terminal extends React.Component {
12
13
}
13
14
14
15
componentDidMount ( ) {
15
- const { redis, style } = this . props ;
16
+ const { redis } = this . props ;
16
17
redis . on ( 'select' , this . onSelectBinded ) ;
17
18
const terminal = this . terminal = $ ( this . refs . terminal ) . terminal ( ( command , term ) => {
18
19
if ( ! command ) {
19
20
return ;
20
21
}
21
- command = command . trim ( ) . replace ( / \s + / g , ' ' ) . split ( ' ' ) ;
22
+ command = splitargs ( command ) ;
22
23
const commandName = command [ 0 ] && command [ 0 ] . toUpperCase ( ) ;
23
24
if ( commandName === 'FLUSHALL' || commandName === 'FLUSHDB' ) {
24
25
term . push ( input => {
Original file line number Diff line number Diff line change 41
41
"react-redux" : " ^4.0.0" ,
42
42
"react-split-pane" : " 0.1.16" ,
43
43
"redis-commands" : " ^1.0.1" ,
44
+ "redis-splitargs" : " ^1.0.0" ,
44
45
"redux" : " ^3.0.2" ,
45
46
"redux-thunk" : " ^1.0.0" ,
46
47
"reselect" : " ^2.0.0" ,
You can’t perform that action at this time.
0 commit comments