shell-sessions

1.0.5 • Public • Published

shell-sessions

A tool for executing commands locally , with a session saving system ( Multiple terminal instances can be run individually )

Usage

const { Terminal } = require('shell-sessions');

const session = new Terminal();
session.execute('cd folder' , (err, output) => {
  if (err) {
    console.error(err);
    return;
  }else{
    console.log(output);
    session.execute('dir' , (err, output) => {
      if (err) {
        console.error(err);
        return;
      }else{
        console.log(output);
      }
    });//minor issue , my code doesn't wait for the previous command to wait , so you have to wait for an output and execute the next command after that like this , if you've any workaround this , i kindly ask you to contact me on discord and tell me what that is! thanks. ( Discord >> user.void )
  }
});

//outputs the files inside the directory "folder"

Installation

Install the package using npm:

npm install shell-sessions

Package Sidebar

Install

npm i shell-sessions

Weekly Downloads

10

Version

1.0.5

License

ISC

Unpacked Size

3.09 kB

Total Files

3

Last publish

Collaborators

  • runevox