Skip to content

A dirty couple of bash scripts that spawn a terminal emulator with whatever program you feed to it

Notifications You must be signed in to change notification settings

quazar-omega/bash-console-runner

Repository files navigation

bash-console-runner

A dirty couple of bash scripts that spawn a terminal emulator with whatever executable you feed to it.
At the end of the execution it will print the return value and the duration of its execution.

example screenshot

Install

git clone https://github.com/Fabrizio-Volonte/bash-console-runner.git
cd bash-console-runner
sudo ./install.sh

Run

To use the script just type:
bash-console-runner-start <executable>

Example

folder structure:
📂
├─ hello_world
└─ hello_world.c
run:
bash-console-runner-start hello_world

Setting Your Terminal Emulator

You will find the xterm terminal hardcoded as a fallback in the bash-console-runner-start script.
Different terminals handle this in pretty different ways ¯\_(ツ)_/¯

To use your terminal emulator of choice, edit the configuartion file in ~/.config/bash-console-runner/terminal-emulator.conf.
Either uncomment the terminal command you want to use (if you uncomment multiple the first uncommented will be used) or add your own.

If you know a terminal that has not been added to the list and you wish to see it added to the configuration then request it in an issue and kindly provide the command in question.

Known Commands

Other

This can be used in Visual Studio Code as a patch to the missing feature of opening in an external terminal with build tasks.

Example configuration

"label": "C (GCC) Compile and Run",
"type": "shell",
"command": "gcc",
"args": 
[  
  "-Wall",
  "-g",
  "${relativeFile}",
  "-o",
  "${fileBasenameNoExtension}",
  "&&",
  "bash-console-runner-start",
  "-disable-nohup",
  "./${fileBasenameNoExtension}",
],

About

A dirty couple of bash scripts that spawn a terminal emulator with whatever program you feed to it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages