From 2179c6702b23f770008e46d71ebd58f2aae3407e Mon Sep 17 00:00:00 2001 From: Keith Peters Date: Thu, 23 Nov 2023 20:04:36 -0500 Subject: [PATCH] Update README.md --- README.md | 62 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 69df729..ecc40b1 100644 --- a/README.md +++ b/README.md @@ -26,24 +26,34 @@ lua -v rustc --version ``` -`version` is a simple, easily updateable script that tells you what version you are on. +`version` is a simple, easily updateable script that tells you what version you are on. It has more than 200 apps registered with the syntax required to find version of that app. It will let you know what that syntax is, and then it'll run the command with that syntax and tell you what version you have (assuming the app is installed). ``` -version node // v14.70 -version gcc // 10.1.0 -version java // 1.8.0_262 -version pascal // 'pascal' does not seem to be installed. +version node +# Command: node -v +# v18.13.0 +``` +``` +version gcc +# Command: gcc --version +# gcc (Ubuntu 13.2.0-4ubuntu3) 13.2.0 +# Copyright (C) 2023 ... +``` +``` +version vim +# Command: nvim -version +# NVIM v0.10.0-dev +# Build type: ... +``` +``` +version nix +# Command: nix --version +# But 'nix' does not seem to be installed ``` ## But wait, there's more! -`version` also uses the package manager on your system to find the versions of programs and libraries that it doesn't know about itself. This puts the number of items that `version` can report the version of into the thousands. This includes libraries which are not directly executable, so don't have a version flag. Examples: - -``` -version libxml2 // 2.9.10-2 -version usbutils // 012-2 -version systemd // 246.4-1 -``` +`version` also uses the package manager on your system to find the versions of programs and libraries that it doesn't know about itself. This puts the number of items that `version` can report the version of into the thousands. This includes libraries which are not directly executable, so don't have a version flag. This feature currently supports the package managers: @@ -56,8 +66,36 @@ This feature currently supports the package managers: - `flatpak` (Linux) - `brew` (Mac and Linux) +Todo: +- `Macports` + If `version` doesn't know about the command, it will start searching through any of the package managers that are installed and report what it finds: + +Examples: + +``` +version libxml2 +# version does not know about 'libxml2' +# checking apt... +# libxml2 version: 2.9.14+dfsg-1.3 +``` +``` +version systemd +# version does not know about 'systemd' +# checking apt... +# systemd version: 253.5-1ubuntu6 +``` +``` +version usbutils +# version does not know about 'setuptools' +# checking apt... +# checking snap... +# checking npm... +# checking pip... +# setuptools version: 68.2.2 +``` + ![version.png](version.png) Read more here: [Package Manager Integration](https://github.com/bit101/version/wiki/Package-Manager-Integration)