Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions interp/builtins/break/break.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2026-present Datadog, Inc.

// Package breakcmd implements the break builtin command.
//
// break — exit from a for, while, or until loop
//
// Usage: break [N]
//
// Exit from the innermost enclosing loop. If N is specified,
// break out of N enclosing loops.
//
// Exit codes:
//
// 0 Loop exited successfully.
// 1 Not inside a loop, or invalid argument.
package breakcmd

import (
Expand Down
13 changes: 13 additions & 0 deletions interp/builtins/cat/cat.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2026-present Datadog, Inc.

// Package cat implements the cat builtin command.
//
// cat — concatenate and print files
//
// Usage: cat [FILE]...
//
// Concatenate FILE(s) to standard output.
// With no FILE, or when FILE is -, read standard input.
//
// Exit codes:
//
// 0 All files processed successfully.
// 1 At least one error occurred (missing file, permission denied, etc.).
package cat

import (
Expand Down
13 changes: 13 additions & 0 deletions interp/builtins/continue/continue.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2026-present Datadog, Inc.

// Package continuecmd implements the continue builtin command.
//
// continue — resume the next iteration of a for, while, or until loop
//
// Usage: continue [N]
//
// Resume the next iteration of the innermost enclosing loop. If N is
// specified, resume the Nth enclosing loop.
//
// Exit codes:
//
// 0 Iteration resumed successfully.
// 1 Not inside a loop, or invalid argument.
package continuecmd

import (
Expand Down
12 changes: 12 additions & 0 deletions interp/builtins/echo/echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2026-present Datadog, Inc.

// Package echo implements the echo builtin command.
//
// echo — write arguments to standard output
//
// Usage: echo [ARG]...
//
// Write each ARG to standard output, separated by a single space,
// followed by a newline.
//
// Exit codes:
//
// 0 Always succeeds.
package echo

import (
Expand Down
15 changes: 15 additions & 0 deletions interp/builtins/exit/exit.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2026-present Datadog, Inc.

// Package exit implements the exit builtin command.
//
// exit — cause the shell to exit
//
// Usage: exit [N]
//
// Exit the shell with status N. If N is omitted, the exit status is
// that of the last command executed. If N is not a valid integer, the
// shell prints an error and exits with status 2.
//
// Exit codes:
//
// N The supplied exit status (truncated to uint8).
// 2 Invalid (non-numeric) argument.
// 1 Too many arguments.
package exit

import (
Expand Down
11 changes: 11 additions & 0 deletions interp/builtins/false/false.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2026-present Datadog, Inc.

// Package falsecmd implements the false builtin command.
//
// false — return an unsuccessful exit status
//
// Usage: false
//
// Do nothing and return an exit status of 1. All arguments are ignored.
//
// Exit codes:
//
// 1 Always fails.
package falsecmd

import (
Expand Down
11 changes: 11 additions & 0 deletions interp/builtins/true/true.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2026-present Datadog, Inc.

// Package truecmd implements the true builtin command.
//
// true — return a successful exit status
//
// Usage: true
//
// Do nothing and return an exit status of 0. All arguments are ignored.
//
// Exit codes:
//
// 0 Always succeeds.
package truecmd

import (
Expand Down