macOS
brew install gnu-getoptlocal Homebrew formula metadata
安装
brew install gnu-getoptlocal Homebrew formula metadata
sudo zypper install gnu-getoptopenSUSE Tumbleweed package metadata · gnu-getopt · 来源: download.opensuse.org
nix profile install nixpkgs#getoptnixpkgs package indexes · pkgs/by-name/ge/getopt/package.nix · 来源: api.github.com
概览
Command-line option parsing utility
历史
`gnu-getopt` packages util-linux's enhanced `getopt(1)` command, a shell-facing option parser that uses GNU `getopt(3)` behavior and is commonly installed separately where the base system ships a less capable `getopt`.
The upstream project is util-linux, described by its README as a collection of Linux utilities. util-linux carried the name util-linux-ng from 2006 through 2010, then continued under the util-linux name with kernel.org as the primary source location and GitHub as a backup web interface.
The util-linux NEWS file records `getopt` updates in the 2.11 and 2.13 development era, including replacement with getopt 1.1.3 by Frodo Looijaard and an update to 1.1.4. The man page identifies the command as the enhanced `getopt`, focused on parsing command options for shell procedures.
As part of util-linux, enhanced `getopt` is part of the broad Linux userland toolbox. On macOS, Homebrew packages it as `gnu-getopt` and marks it keg-only because macOS provides BSD `getopt`; on Linux, the formula also avoids conflict with the full util-linux package. That packaging split is the main reason the Homebrew package name differs from the upstream project name.
Practitioners use `getopt` in shell scripts to normalize short and long options, detect invalid arguments, preserve whitespace through shell quoting, and test whether the enhanced implementation is present. The `-T` probe is explicitly documented for distinguishing this implementation from older `getopt(1)` variants.
The package matters because option parsing is a portability trap in shell scripts. Installing `gnu-getopt` gives macOS and other non-GNU environments the util-linux behavior many Linux-oriented scripts expect, while Homebrew's keg-only status prevents accidental replacement of the system utility.
安全态势
没有找到 gnu-getopt 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布,以便未来覆盖拥有稳定的软件包 URL。
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
getopt | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/util-linux/util-linux
安装元数据
| 软件包键 | brew:gnu-getopt |
|---|---|
| 版本 | 2.42.2 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/gnu-getopt |
| 主页 | https://github.com/util-linux/util-linux |
| 仓库 | https://github.com/util-linux/util-linux |
| 上游文档 | https://github.com/util-linux/util-linux/blob/master/misc-utils/getopt.1.adoc |
| 许可证 | GPL-2.0-or-later |
| 源码归档 | https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.42/util-linux-2.42.2.tar.gz |
| 最后更新 | 2026-06-16T16:47:43Z |
| Pulse | updated |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | gnu-getopt |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | yes |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
gnu-getopt 1.0.14-2.7
Java getopt Implementation
https://www.urbanophile.com/arenn/hacking/download.html
sudo zypper install gnu-getoptgnu-getopt-javadoc 1.0.14-2.7
Javadoc for gnu.getopt
https://www.urbanophile.com/arenn/hacking/download.html
sudo zypper install gnu-getopt-javadocgetopt
nix profile install nixpkgs#getopt来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.