Skip to content

tdurieux/bash-command-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bash Command Extractor

Usage

npm i -g @tdurieux/bash-command-extractor
bash-command-extractor <bash_code>

Example

./bash-command-extractor "sudo apt install git"

[
  {
    "annotations": [
      "SC-SUDO"
    ],
    "command": "sudo",
    "args": []
  },
  {
    "annotations": [
      "SC-APT-INSTALL"
    ],
    "command": "apt",
    "args": [
      {
        "annotations": [],
        "content": "install"
      },
      {
        "annotations": [
          "SC-APT-PACKAGE"
        ],
        "content": "git"
      }
    ]
  }
]

About

Extract the list of command inside a bash string

Resources

Stars

Watchers

Forks

Packages

No packages published