summaryrefslogtreecommitdiff
path: root/sh/sh.go
diff options
context:
space:
mode:
Diffstat (limited to 'sh/sh.go')
-rw-r--r--sh/sh.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/sh/sh.go b/sh/sh.go
new file mode 100644
index 0000000..f69de02
--- /dev/null
+++ b/sh/sh.go
@@ -0,0 +1,28 @@
+package sh
+
+// Implementations must not retain p.
+type Writer interface {
+ Write(p []byte) (n int, err error)
+}
+
+
+// Implementations must not retain p.
+type Argv interface {
+ InitIO(out io.Writer, err io.Writer)
+ InitPB(pb *argvpb.Argv)
+ WriteOUT(bytes []byte)
+ WriteERR(bytes []byte)
+ Stdout(out io.Writer)
+ Stderr(err io.Writer)
+ Match() (matches []string, err error)
+ Help() (help string, err error)
+ Exit(s string, err error)
+}
+
+// Implementations must not retain p.
+type Command interface {
+ Run(pb *shpb.Command)
+ Start(pb *shpb.Command)
+ Exit(pb *shpb.Command)
+}
+