|
|
@@ -74,15 +74,12 @@ function pgsh(ev) {
|
|
|
'hello': { order: 2, help: 'Say hello to the computer\nUsage: hello [name]' },
|
|
|
'help': { order: 1, help: 'List commands or view information for one\nUsage: help [command]' },
|
|
|
'ls': { order: 2, help: 'List folder contents' },
|
|
|
- 'magic': { order: 1, help: 'The Website of an Artist' },
|
|
|
'pwd': { order: 2, help: 'Show the current working directory' },
|
|
|
- 'question': { order: 1, help: 'Displays a question' },
|
|
|
'search': { order: 2, help: 'Search the Web (with a Duck)\nUsage: search [query]' },
|
|
|
'su': { order: 2, help: 'Gain Phenomenal Cosmic Power' },
|
|
|
'version': { order: 1, help: 'Display shell information' }
|
|
|
}
|
|
|
this.about = function(args) { self.cat(['/home/pgs/about.md']) }
|
|
|
- this.magic = function(args) { self.cat(['/home/pgs/magic.txt']) }
|
|
|
this.cat = function(args) {
|
|
|
var arg = args.join(' ').trim()
|
|
|
var path = resolveAbsPath(arg)
|
|
|
@@ -170,22 +167,6 @@ function pgsh(ev) {
|
|
|
}
|
|
|
}
|
|
|
this.pwd = function(args) { show(self.cwd) }
|
|
|
- this.question = function(args) {
|
|
|
- var questions = [
|
|
|
- 'Isn\'t <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ"' +
|
|
|
- ' target="_blank">this song</a> the best?',
|
|
|
- '1 + 2 = ?',
|
|
|
- 'Am I a sandwich?',
|
|
|
- 'Where were you at 3:15am on April 14th?',
|
|
|
- "Don't you mean prism?",
|
|
|
- 'Butts twelve by pies?',
|
|
|
- 'I say there, Monstrosity. Do you know the times?',
|
|
|
- 'What is the name of the spaces between the teeth of a comb?',
|
|
|
- 'Why are you dressed up like Ship\'s Captain?'
|
|
|
- ]
|
|
|
- var rand = Math.floor(Math.random() * questions.length);
|
|
|
- show(questions[rand])
|
|
|
- }
|
|
|
this.search = function(args) {
|
|
|
if (!args.join(' ').trim()) { return show(self.commands.search.help) }
|
|
|
ev.trigger('prompt_hide')
|
|
|
@@ -213,7 +194,7 @@ function pgsh(ev) {
|
|
|
}
|
|
|
this.version = function(args) {
|
|
|
show('Parsley Gardens Shell (pgsh) 1.2.0\nBuilt with: ' +
|
|
|
- '<a target="_blank" href="http://riotjs.com">Riot</a> ' +
|
|
|
+ '<a target="_blank" href="http://riot.js.org">Riot</a> ' +
|
|
|
'<a target="_blank" href="https://skeleton-framework.github.io">Skeleton</a> ' +
|
|
|
'<a target="_blank" href="https://highlightjs.org">highlight.js</a>')
|
|
|
}
|