From 01689af9527dc8e1320921c29c438faea3a6a69f Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Tue, 5 Jul 2016 13:22:57 -0700 Subject: [PATCH] term: handle legacy `sh` shell --- app/term.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/term.js b/app/term.js index 07506bd2..80448f23 100644 --- a/app/term.js +++ b/app/term.js @@ -46,7 +46,7 @@ hterm.Keyboard.prototype.onKeyPress_ = function (e) { }; const domainRegex = /\b((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}\b/; -const bashRegex = /bash: ((https?:\/\/)|(\/\/))?(.*): ((command not found)|(No such file or directory))/; +const bashRegex = /(ba)?sh: ((https?:\/\/)|(\/\/))?(.*): ((command not found)|(No such file or directory))/; const zshRegex = /zsh: ((command not found)|(no such file or directory)): ((https?:\/\/)|(\/\/))?([^\n]+)/; export default class Term extends Component { @@ -116,7 +116,7 @@ export default class Term extends Component { let url; if (match) { - url = match[4]; + url = match[5]; } else { match = data.match(zshRegex); if (match) {