Round 313: Nftables ext, Iproute2 ext, Ethtool ext, Btrfs ext, Zfs ext (20 commands)
ober
79b5e238f379db1ddc48cca8626bfcdcba4f2cbd
--- a/docs/jemacs-vs-emacs.md +++ b/docs/jemacs-vs-emacs.md @@ -4583,6 +4583,31 @@ No remaining Tier 1 gaps. All core editing, completion, and navigation features | ebib-import-file | :orange_circle: | Import file into Ebib | | ebib-push-citation | :orange_circle: | Push Ebib citation to buffer | +### Round 313 — Nftables ext, Iproute2 ext, Ethtool ext, Btrfs ext, Zfs ext + +| Feature | Status | Notes | +|---------|--------|-------| +| `nft-list-ruleset` | :orange_circle: | List nftables ruleset | +| `nft-add-rule` | :orange_circle: | Add nftables rule | +| `nft-delete-rule` | :orange_circle: | Delete nftables rule | +| `nft-flush-ruleset` | :orange_circle: | Flush nftables ruleset | +| `ip-rule-show` | :orange_circle: | Show routing rules | +| `ip-tunnel-show` | :orange_circle: | Show tunnels | +| `ip-maddr-show` | :orange_circle: | Show multicast addresses | +| `ip-neigh-show` | :orange_circle: | Show neighbor table | +| `ethtool-show` | :orange_circle: | Show interface settings | +| `ethtool-features` | :orange_circle: | Show interface features | +| `ethtool-driver` | :orange_circle: | Show driver info | +| `ethtool-pause` | :orange_circle: | Show pause parameters | +| `btrfs-subvolume-list` | :orange_circle: | List btrfs subvolumes | +| `btrfs-subvolume-create` | :orange_circle: | Create btrfs subvolume | +| `btrfs-subvolume-delete` | :orange_circle: | Delete btrfs subvolume | +| `btrfs-filesystem-show` | :orange_circle: | Show btrfs filesystem info | +| `zfs-send` | :orange_circle: | Send ZFS snapshot | +| `zfs-receive` | :orange_circle: | Receive ZFS dataset | +| `zfs-get` | :orange_circle: | Get ZFS properties | +| `zfs-set` | :orange_circle: | Set ZFS property | + ### Round 312 — Resolvectl ext, Bootctl ext, Homectl ext, Oomctl ext, Systemd-analyze ext | Feature | Status | Notes | --- a/src/jerboa-emacs/editor-extra-final.ss +++ b/src/jerboa-emacs/editor-extra-final.ss @@ -23611,4 +23611,64 @@ (let* ((echo (app-state-echo app))) (echo-read-string echo "Unit to verify: " (lambda (unit) - (echo-message! echo (str "Systemd-analyze: verifying " unit)))))) \ No newline at end of file + (echo-message! echo (str "Systemd-analyze: verifying " unit)))))) + +;;; Round 313 — Ethtool ext, Btrfs ext, Zfs ext (batch 2) + +(def (cmd-ethtool-driver app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Interface: " + (lambda (iface) + (echo-message! echo (str "Ethtool: showing driver info for " iface)))))) + +(def (cmd-ethtool-pause app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Interface: " + (lambda (iface) + (echo-message! echo (str "Ethtool: showing pause params for " iface)))))) + +(def (cmd-btrfs-subvolume-list app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Mount point: " + (lambda (mnt) + (echo-message! echo (str "Btrfs: listing subvolumes at " mnt)))))) + +(def (cmd-btrfs-subvolume-create app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Subvolume path: " + (lambda (path) + (echo-message! echo (str "Btrfs: creating subvolume " path)))))) + +(def (cmd-btrfs-subvolume-delete app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Subvolume path: " + (lambda (path) + (echo-message! echo (str "Btrfs: deleting subvolume " path)))))) + +(def (cmd-btrfs-filesystem-show app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Btrfs: showing filesystem info"))) + +(def (cmd-zfs-send app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Snapshot to send: " + (lambda (snap) + (echo-message! echo (str "ZFS: sending snapshot " snap)))))) + +(def (cmd-zfs-receive app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Dataset to receive into: " + (lambda (ds) + (echo-message! echo (str "ZFS: receiving into " ds)))))) + +(def (cmd-zfs-get app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Dataset: " + (lambda (ds) + (echo-message! echo (str "ZFS: getting properties of " ds)))))) + +(def (cmd-zfs-set app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Property=value dataset: " + (lambda (spec) + (echo-message! echo (str "ZFS: setting " spec)))))) \ No newline at end of file --- a/src/jerboa-emacs/editor-extra-modes.ss +++ b/src/jerboa-emacs/editor-extra-modes.ss @@ -24332,3 +24332,53 @@ (lambda (user) (echo-message! echo (str "Homectl: removing home for " user)))))) +;;; Round 313 — Nftables ext, Iproute2 ext, Ethtool ext, Btrfs ext, Zfs ext (batch 1) + +(def (cmd-nft-list-ruleset app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Nftables: listing ruleset"))) + +(def (cmd-nft-add-rule app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Rule spec: " + (lambda (rule) + (echo-message! echo (str "Nftables: adding rule " rule)))))) + +(def (cmd-nft-delete-rule app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Rule handle: " + (lambda (handle) + (echo-message! echo (str "Nftables: deleting rule " handle)))))) + +(def (cmd-nft-flush-ruleset app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Nftables: flushing ruleset"))) + +(def (cmd-ip-rule-show app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Iproute2: showing routing rules"))) + +(def (cmd-ip-tunnel-show app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Iproute2: showing tunnels"))) + +(def (cmd-ip-maddr-show app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Iproute2: showing multicast addresses"))) + +(def (cmd-ip-neigh-show app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Iproute2: showing neighbor table"))) + +(def (cmd-ethtool-show app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Interface: " + (lambda (iface) + (echo-message! echo (str "Ethtool: showing settings for " iface)))))) + +(def (cmd-ethtool-features app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Interface: " + (lambda (iface) + (echo-message! echo (str "Ethtool: showing features of " iface)))))) + --- a/src/jerboa-emacs/editor-extra-regs2.ss +++ b/src/jerboa-emacs/editor-extra-regs2.ss @@ -7990,4 +7990,25 @@ (register-command! 'systemd-analyze-security cmd-systemd-analyze-security) (register-command! 'systemd-analyze-unit cmd-systemd-analyze-unit) (register-command! 'systemd-analyze-verify cmd-systemd-analyze-verify) + ;; Round 313 + (register-command! 'nft-list-ruleset cmd-nft-list-ruleset) + (register-command! 'nft-add-rule cmd-nft-add-rule) + (register-command! 'nft-delete-rule cmd-nft-delete-rule) + (register-command! 'nft-flush-ruleset cmd-nft-flush-ruleset) + (register-command! 'ip-rule-show cmd-ip-rule-show) + (register-command! 'ip-tunnel-show cmd-ip-tunnel-show) + (register-command! 'ip-maddr-show cmd-ip-maddr-show) + (register-command! 'ip-neigh-show cmd-ip-neigh-show) + (register-command! 'ethtool-show cmd-ethtool-show) + (register-command! 'ethtool-features cmd-ethtool-features) + (register-command! 'ethtool-driver cmd-ethtool-driver) + (register-command! 'ethtool-pause cmd-ethtool-pause) + (register-command! 'btrfs-subvolume-list cmd-btrfs-subvolume-list) + (register-command! 'btrfs-subvolume-create cmd-btrfs-subvolume-create) + (register-command! 'btrfs-subvolume-delete cmd-btrfs-subvolume-delete) + (register-command! 'btrfs-filesystem-show cmd-btrfs-filesystem-show) + (register-command! 'zfs-send cmd-zfs-send) + (register-command! 'zfs-receive cmd-zfs-receive) + (register-command! 'zfs-get cmd-zfs-get) + (register-command! 'zfs-set cmd-zfs-set) )