diff --git a/client/components/main/Main/Database/Content/Terminal.jsx b/client/components/main/Main/Database/Content/Terminal.jsx index f0c1a996..408d3e22 100644 --- a/client/components/main/Main/Database/Content/Terminal.jsx +++ b/client/components/main/Main/Database/Content/Terminal.jsx @@ -2,6 +2,7 @@ import React from 'react'; import commands from 'redis-commands'; +import splitargs from 'redis-splitargs'; require('./Terminal.scss'); @@ -12,13 +13,13 @@ class Terminal extends React.Component { } componentDidMount() { - const { redis, style } = this.props; + const { redis } = this.props; redis.on('select', this.onSelectBinded); const terminal = this.terminal = $(this.refs.terminal).terminal((command, term) => { if (!command) { return; } - command = command.trim().replace(/\s+/g, ' ').split(' '); + command = splitargs(command); const commandName = command[0] && command[0].toUpperCase(); if (commandName === 'FLUSHALL' || commandName === 'FLUSHDB') { term.push(input => { diff --git a/package.json b/package.json index 1d4e81fa..e8dc96df 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "react-redux": "^4.0.0", "react-split-pane": "0.1.16", "redis-commands": "^1.0.1", + "redis-splitargs": "^1.0.0", "redux": "^3.0.2", "redux-thunk": "^1.0.0", "reselect": "^2.0.0",