Skip to content

Add completion spec: iproute2 (ip)#261

Merged
lucieleblanc merged 1 commit into
mainfrom
app-3969/command-spec-ip
Apr 10, 2026
Merged

Add completion spec: iproute2 (ip)#261
lucieleblanc merged 1 commit into
mainfrom
app-3969/command-spec-ip

Conversation

@lucieleblanc
Copy link
Copy Markdown
Contributor

Summary

Add top-level command completions for the ip command (iproute2), the standard Linux networking utility for managing routing, network devices, interfaces, and tunnels.

Linear ticket: APP-3969

What's included

Subcommands

All ip objects as subcommands: address, addrlabel, fou, help, ila, ioam, l2tp, link, macsec, maddress, monitor, mptcp, mroute, mrule, neighbour, netconf, netns, nexthop, ntable, route, rule, sr, tap, tcpmetrics, token, tunnel, tuntap, vrf, xfrm.

Global options

All global flags including -json, -brief, -netns, -family, -batch, -oneline, -color, -resolve, -statistics, -details, -human-readable, -pretty, -timestamp, -all, -Numeric, -Version, and protocol family shortcuts (-4, -6, -M, -B, -0).

Generators

  • netns: Lists available network namespaces via ip netns list for the -netns flag

Scope

This PR covers top-level completions only. Individual subcommand completions (e.g., ip address add, ip link set) are tracked as child issues of APP-3969.

Research sources

Testing

  • script/presubmit passes (fmt, clippy, 54 tests)
  • JSON spec formatted with prettier

Conversation: https://staging.warp.dev/conversation/d8ebb1e4-9630-4e31-88ce-01c4853128c1

This PR was generated with Oz.

Add top-level command completions for the ip command (iproute2):
- All subcommands (address, link, route, netns, etc.)
- All global flags (-json, -brief, -netns, -family, etc.)
- Generator for network namespace names (-netns flag)

Individual subcommand completions are tracked as child issues.

Resolves: APP-3969

Co-Authored-By: Oz <oz-agent@warp.dev>
@linear
Copy link
Copy Markdown

linear Bot commented Apr 10, 2026

APP-3969 [Auto] Add ip completions

Add top-level command completions for ip — the list of subcommands (addr, link, route, etc.) and global flags. Individual subcommand completions are tracked as child issues.

Fish shell reference implementation: https://github.com/fish-shell/fish-shell/blob/master/share/completions/ip.fish

lucieleblanc added a commit that referenced this pull request Apr 10, 2026
Copy link
Copy Markdown
Contributor Author

Generator Screenshot Validation: netns

netns generator — ip -n <Tab> (network namespace completions)

The netns generator runs ip netns list and produces network namespace name completions for the -n/-netns flag.

Test setup: Created two test namespaces (test_ns1, test_ns2) via ip netns add. Typed ip -n and pressed Tab to trigger completions.

Result: Both namespaces appear correctly in the completions dropdown with "Network namespace" descriptions.

netns generator completions

Note: The completions trigger with the short form -n but not the long form -netns, which appears to be a limitation of how Warp's completion parser handles single-dash multi-character flags. The generator itself works correctly.

@lucieleblanc lucieleblanc marked this pull request as ready for review April 10, 2026 16:09
@lucieleblanc lucieleblanc merged commit 776422b into main Apr 10, 2026
3 checks passed
@lucieleblanc lucieleblanc deleted the app-3969/command-spec-ip branch April 10, 2026 20:03
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.

3 participants