diff --git a/.circleci/config.yml b/.circleci/config.yml
index e8cd30c38a..04bea2dccc 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -26,10 +26,10 @@ jobs:
- checkout
- restore_cache:
keys:
- - dep-bundle-14-{{ checksum "package.json" }}
+ - dep-bundle-15-{{ checksum "package.json" }}
- run: npm install
- save_cache:
- key: dep-bundle-14-{{ checksum "package.json" }}
+ key: dep-bundle-15-{{ checksum "package.json" }}
paths:
- ~/repo/node_modules
- run: npm run lint && npm run test && npm run downloadsolc && npm run make-mock-compiler && npm run build
@@ -46,10 +46,10 @@ jobs:
- checkout
- restore_cache:
keys:
- - dep-bundle-9-{{ checksum "package.json" }}
+ - dep-bundle-10-{{ checksum "package.json" }}
- run: npm install
- save_cache:
- key: dep-bundle-9-{{ checksum "package.json" }}
+ key: dep-bundle-10-{{ checksum "package.json" }}
paths:
- ~/repo/node_modules
- run: npm run build_debugger
diff --git a/src/app/panels/terminal.js b/src/app/panels/terminal.js
index bc253ca8da..bfe9537b75 100644
--- a/src/app/panels/terminal.js
+++ b/src/app/panels/terminal.js
@@ -338,6 +338,15 @@ class Terminal {
self._cmdIndex = -1
self._cmdTemp = ''
+ var intro = yo`
- Welcome to Remix v0.6.4 -
+
You can use this terminal for:
+
- Checking transactions details and start debugging.
+
- Running JavaScript scripts.
+
- Running JavaScript scripts involving web3 if the current environement is injected provider or Web3 provider.
+
- Executing common command to interact with the Remix interface (see list of commands below). Note that these command can also be included in a JavaScript script.
`
+
+ self.commands.html(intro)
+ self._shell('remix.help()', self.commands, () => {})
return self._view.el
function change (event) {
@@ -547,6 +556,9 @@ class Terminal {
return self.commands[name]
}
_shell (script, scopedCommands, done) { // default shell
+ if (script.indexOf('remix:') === 0) {
+ return done(null, 'This type of command has been deprecated and is not functionning anymore. Please run remix.help() to list available commands.')
+ }
var self = this
var context = domTerminalFeatures(self, scopedCommands)
try {
diff --git a/src/lib/cmdInterpreterAPI.js b/src/lib/cmdInterpreterAPI.js
index 23c3bc3311..5f1903e83a 100644
--- a/src/lib/cmdInterpreterAPI.js
+++ b/src/lib/cmdInterpreterAPI.js
@@ -1,4 +1,5 @@
'use strict'
+var yo = require('yo-yo')
var async = require('async')
var remixLib = require('remix-lib')
var EventManager = remixLib.EventManager
@@ -18,6 +19,14 @@ class CmdInterpreterAPI {
app: self._components.registry.get('app').api,
editor: self._components.registry.get('editor').api
}
+ self.commandHelp = {
+ 'remix.debug(hash)': 'Start debugging a transaction.',
+ 'remix.loadgist(id)': 'Load a gist in the file explorer.',
+ 'remix.loadurl(url)': 'Load the given url in the file explorer. The url can be of type github, swarm or ipfs.',
+ 'remix.setproviderurl(url)': 'Change the current provider to Web3 provider and set the url endpoint.',
+ 'remix.exeCurrent()': 'Run the script currently displayed in the editor',
+ 'remix.help()': 'Display this help message'
+ }
}
debug (hash, cb) {
const self = this
@@ -33,7 +42,7 @@ class CmdInterpreterAPI {
const self = this
self._deps.app.importExternal(url, (err, content) => {
if (err) {
- toolTip(`Unable to load ${url} from swarm: ${err}`)
+ toolTip(`Unable to load ${url}: ${err}`)
if (cb) cb(err)
} else {
try {
@@ -70,6 +79,17 @@ class CmdInterpreterAPI {
}
self._components.terminal.commands.script(content)
}
+ help (cb) {
+ const self = this
+ var help = yo``
+ for (var k in self.commandHelp) {
+ help.appendChild(yo`${k}: ${self.commandHelp[k]}
`)
+ help.appendChild(yo`
`)
+ }
+ self._components.terminal.commands.html(help)
+ if (cb) cb()
+ return ''
+ }
}
module.exports = CmdInterpreterAPI