Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow running commands on the host #174

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Allow running commands on the host #174

wants to merge 3 commits into from

Conversation

skx
Copy link
Owner

@skx skx commented Jan 6, 2025

This is disabled by default, but can be enabled via:

  • The -exec-prefix='!!' flag.
  • The built-in !hostcmd !! binary.

The result of either of these will be that commands can be executed on the host by prefixing them with !!. A different prefix may be selected, of course.

This will close #173.

Sample run:

A>!!
!!?
A>!hostcmd !!

A>!!uptime
 14:41:19 up  1:20,  1 user,  load average: 0.68, 0.58, 0.54


A>!hostcmd
The command-prefix for executing commands on the host is '!!'
(An empty value means that host-execution is disabled.)

A>!hostcmd exec-

A>exec-ls
ccp
consolein
consoleout
cpm
cpmulator
DEBUGGING.md
dist
Dockerfile
EXTENSIONS.md
fcb
go.mod
go.sum
LICENSE
main.go
main_test.go
Makefile
memory
README.md
samples
static
version

skx added 3 commits January 6, 2025 14:39
This is disabled by default, but can be enabled via:

* The `-exec-prefix='!!'` flag.
* The built-in `!hostcmd !!` binary.

The result of either of these will be that commands can be executed
on the host by prefixing them with `!!`.  A different prefix may be
selected, of course.

This will close #173.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow running commands on the host?
1 participant