title: How do I add cases to the switch statement for this terminal emulator codepen?
body: <p>I am editing the script of this codepen: <a href="https://codepen.io/rafael-casachi/pen/qLEeJV" rel="nofollow noreferrer">https://codepen.io/rafael-casachi/pen/qLEeJV</a>
  to use on my website, but I can’t figure out how to add more cases to the switch statement that will perform the functions I need.  Here’s what I would like to add:</p>
  <p>case ‘cd’
  the user can type ‘cd’ followed by a word, then go to the page of my website with that path name (e.g. user types ‘cd shop’ and it opens a window with the url <a href="http://www.mywebsite.com/shop" rel="nofollow noreferrer">www.mywebsite.com/shop</a>)</p>
  <p>case ‘find’
  the user can type ‘find’ followed by a word to search for that keyword on my website (like a search bar; e.g. the user types ‘find pants’ which triggers a search for anything with the keyword ‘pants’ on my website)</p>
  <p>Any idea what I should do?  Thanks!</p>
  <pre><code>&lt;script&gt;
  
  var util = util || {};
  util.toArray = function(list) {
     return Array.prototype.slice.call(list || [], 0);
  };
  
  var Terminal = Terminal || function(cmdLineContainer, outputContainer) {
     window.URL = window.URL || window.webkitURL;
     window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
  
     var cmdLine_ = document.querySelector(cmdLineContainer);
     var output_ = document.querySelector(outputContainer);
  
     const CMDS_ = [
        'cat', 'clear', 'date', 'echo', 'help', 'uname', 'whoami', 'me'
     ];
  
     var fs_ = null;
     var cwd_ = null;
     var history_ = [];
     var histpos_ = 0;
     var histtemp_ = 0;
  
     window.addEventListener('click', function(e) {
        cmdLine_.focus();
     }, false);
  &lt;/script&gt;
  
  &lt;div id=&quot;wrapper&quot;&gt;
     &lt;output&gt;&lt;/output&gt;
     &lt;div id=&quot;input-line&quot; class=&quot;input-line&quot;&gt;
        &lt;div class=&quot;prompt&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;input class=&quot;cmdline&quot; autofocus /&gt;&lt;/div&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  
  }
  
  .ls-files {
     height: 45px;
     -webkit-column-width: 100px;
     -moz-column-width: 100px;
     -o-column-width: 100px;
     column-width: 100px;
  }
  
  &lt;style&gt;
  $font-color: #0f8;
  $bg-color: #111;
  $header-color: #fff;
  $selection-color: #FF5E99;
  $font-family: &quot;Courier New&quot;, monospace;
  $font-size: 13px;
  
  ::selection {
    background: $selection-color;
  }
  
  html, body {
    width: 100%;
    height: 100%;
    margin: 0;
  }
  
  body {
     font-family: $font-family;
     color: $header-color;
     background: $bg-color;
     font-size: $font-size;
  }
  
  #wrapper {
     padding: .1em 5em 1em 1em;
     line-height: 1;
     
     output {
        clear: both;
        width: 100%;
        
        h3, h2 {
           margin: 0;
        }
        
        pre {
           margin: 0;
        }
        
        p {
           margin-top: .5em;
           margin-bottom: .5em;
        }
     }
  }
  
  .input-line {
     display: -webkit-box;
     -webkit-box-orient: horizontal;
  &lt;/style&gt;
  </code></pre>