fix: typo in color variable name + cross-platform IP detection fallback#1
Open
kbrenner-dev wants to merge 6 commits into
Open
fix: typo in color variable name + cross-platform IP detection fallback#1kbrenner-dev wants to merge 6 commits into
kbrenner-dev wants to merge 6 commits into
Conversation
This makes the plugin work with any ZSH plugin manager (oh-my-zsh, antigen, zplug, manual installs) instead of being locked to zim.
…ipt-relative path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
1. Typo in
cinelog.plugin.zshBAISC_MAGENTA→BASIC_MAGENTAThis typo means the variable is defined as
BAISC_MAGENTAbut any code referencingBASIC_MAGENTAwould get an empty string instead of the magenta color escape code.2. Cross-platform IP detection in
http_server.pyThe current implementation uses
ip route get 1 | awk '{print $7}'which only works on Linux and fails silently on macOS/BSD. Added asocket-based fallback which works on all platforms.3. Missing Python dependencies for
histThe
histscript requires bothdocoptandprompt_toolkit, but the README only mentionedapt install python3-docopt—prompt_toolkitwas completely missing from the installation instructions, causing the script to fail on a fresh install.Added
requirements.txtwith both dependencies and updated the README accordingly.4. Hardcoded
~/.zim/modules/cinelog/pathBoth
cinelog.plugin.zshandhttp_server.pyhad the zim install path hardcoded, which breaks the plugin for anyone using oh-my-zsh, antigen, zplug, or a manual install.Fix:
cinelog.plugin.zsh: addedCINELOG_DIR="${0:A:h}"— ZSH's built-in way to get the current script's directory at runtime, works with any plugin manager.http_server.py: replaced hardcoded path withos.path.dirname(os.path.realpath(__file__))as fallback, also respects aCINELOG_DIRenv var exported by the plugin.