Files
nvm-auto-use.fish/functions/nvm_version_prompt.fish
Ismo Vuorinen 5b680f06ac feat: refactor plugin architecture, enhance linting, CI & tooling
- Major refactor of core Fish functions for modularity, caching, and error handling
- Improved `.editorconfig` and Makefile for stricter formatting and linting standards
- Expanded linting support: added EditorConfig checks, auto-install for missing tools, and Makefile targets
- Enhanced CI workflow with clearer permissions and job steps in GitHub Actions
- Updated documentation in `README.md` and `CLAUDE.md` to reflect new features, advanced developer tools, and contribution guidelines
- Improved Node.js version manager detection, switching, and installation logic
- Added/updated utility functions for configuration, silent mode, notifications, and version extraction
- Various bug fixes, code quality improvements, and expanded test coverage
2025-07-16 15:12:14 +03:00

30 lines
838 B
Fish

function nvm_version_prompt -d "Display current Node.js version for prompt integration"
if command -q node
set -l version (node -v 2>/dev/null | string replace 'v' '')
if test -n "$version"
echo "$version"
end
end
end
function nvm_version_status -d "Show detailed Node.js version status"
if command -q node
set -l version (node -v 2>/dev/null | string replace -r '^v' '')
set -l npm_version
if command -q npm
set npm_version (npm -v 2>/dev/null)
end
echo "Node.js: v$version"
if test -n "$npm_version"
echo "npm: v$npm_version"
end
if set -q _nvm_auto_use_cached_file
echo "Auto-use: $_nvm_auto_use_cached_file"
end
else
echo "Node.js: not installed"
end
end