Remove deprecated homebrew/cask-fonts tap; add --version, --list-installed, --list-available flags - #1
Conversation
…alled, --list-available flags - Remove ensure_fonts_tap() which referenced the deprecated homebrew/cask-fonts tap (merged into homebrew/cask since Homebrew 4.3.0) - Add VERSION variable and --version/-v flag - Add --list-installed/-l flag for non-interactive installed font listing - Add --list-available/-a flag for non-interactive available font listing - Update help text with new flags - Update zsh, bash, and fish completions with new flags - Update README with note about deprecated tap and new usage examples - Update CHANGELOG.md with v1.0.3 entry Co-authored-by: auge2u <750093+auge2u@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request modernizes the nerd-font-manager by removing deprecated Homebrew tap logic and adding non-interactive command-line flags for better scripting support. The homebrew/cask-fonts tap was merged into the main homebrew/cask repository in Homebrew 4.3.0 (May 2024), making the ensure_fonts_tap() function obsolete. The PR also introduces version display and font listing capabilities that make the tool more suitable for automation and integration with other scripts.
Changes:
- Removed the deprecated
ensure_fonts_tap()function that checked for and added thehomebrew/cask-fontstap - Added version management with a centralized
VERSIONvariable and--version/-vflag to display it - Added
--list-installed/-land--list-available/-aflags for non-interactive font listing suitable for piping and scripting
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| nerd-font-manager.sh | Removed deprecated tap function, added VERSION variable, implemented three new flags (--version, --list-installed, --list-available), updated help text |
| completions/nerd-font-manager.fish | Added completion definitions for the three new flags for both nerd-font-manager and nerd-font-manager.sh commands |
| completions/nerd-font-manager.bash | Added all new flags to the completion options string |
| completions/_nerd-font-manager | Added zsh completion entries for the three new flags with mutual exclusion groups |
| README.md | Added deprecation note about homebrew/cask-fonts in Prerequisites section, added usage examples for all three new flags |
| CHANGELOG.md | Added v1.0.3 release entry documenting the fix and new features with proper Keep a Changelog formatting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| echo " --cli, -c Run in CLI mode with fzf (default)" | ||
| echo " --gui, -g Run in GUI mode with macOS dialogs" | ||
| echo " --help, -h Show this help message" | ||
| echo "Usage: $0 [--cli|-c] [--gui|-g] [--help|-h] [--version|-v]" |
There was a problem hiding this comment.
The Usage line in the help text is incomplete. It shows Usage: $0 [--cli|-c] [--gui|-g] [--help|-h] [--version|-v] but does not include the newly added --list-installed|-l and --list-available|-a flags. The usage line should include all available options or use a more generic format to indicate that multiple options are available.
Consider updating to:
Usage: $0 [OPTIONS]
or listing all options:
Usage: $0 [--cli|-c] [--gui|-g] [--version|-v] [--list-installed|-l] [--list-available|-a] [--help|-h]
| echo "Usage: $0 [--cli|-c] [--gui|-g] [--help|-h] [--version|-v]" | |
| echo "Usage: $0 [--cli|-c] [--gui|-g] [--version|-v] [--list-installed|-l] [--list-available|-a] [--help|-h]" |
homebrew/cask-fontswas deprecated in Homebrew 4.3.0 (May 2024) and merged intohomebrew/cask. Theensure_fonts_tap()function fails or warns on modern Homebrew. Additionally, the tool lacked non-interactive listing and version output.Changes
ensure_fonts_tap()— font casks resolve directly fromhomebrew/casknow, no extra tap needed--version/-v— printsnerd-font-manager $VERSION(centralizedVERSIONvariable in config)--list-installed/-land--list-available/-a— non-interactive font listing for scripting/piping$ nerd-font-manager --version nerd-font-manager 1.0.3 $ nerd-font-manager --list-installed font-fira-code-nerd-font font-hack-nerd-font $ nerd-font-manager --list-available | head -3 font-0xproto-nerd-font font-3270-nerd-font font-agave-nerd-font💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.