From 44391f0a5f8bcd99b7d7ecc4edd8c715d673edae Mon Sep 17 00:00:00 2001
From: Oleg Gaidarenko
Date: Tue, 21 Jan 2025 07:59:28 +0100
Subject: [PATCH] docs: refine documentation
Add some useful stuff, like usage section
---
.../remove-everything/remove-everything.go | 2 +-
cmd/commands/rm/rm.go | 6 +--
cmd/commands/templates.go | 6 +--
cmd/commands/version/verison.go | 2 +-
readme.md | 46 +++++++++++++++++--
5 files changed, 50 insertions(+), 12 deletions(-)
diff --git a/cmd/commands/remove-everything/remove-everything.go b/cmd/commands/remove-everything/remove-everything.go
index f484ee2..6e46034 100644
--- a/cmd/commands/remove-everything/remove-everything.go
+++ b/cmd/commands/remove-everything/remove-everything.go
@@ -18,7 +18,7 @@ import (
// Command config
var Command = &cobra.Command{
Use: "remove-everything",
- Short: "removes everything related to the eclectica",
+ Short: "removes everything related to eclectica",
Run: run,
}
diff --git a/cmd/commands/rm/rm.go b/cmd/commands/rm/rm.go
index 8b341f9..7ee0dde 100644
--- a/cmd/commands/rm/rm.go
+++ b/cmd/commands/rm/rm.go
@@ -21,13 +21,13 @@ var Command = &cobra.Command{
// Command example
var example = `
- Install specifc version
+ Remove specifc version
$ ec rm rust@1.11.0
- Remove language version with interactive list
+ Remove language version via interactive list
$ ec rm go
- Remove with interactive list
+ Remove via interactive list
$ ec rm`
// Runner
diff --git a/cmd/commands/templates.go b/cmd/commands/templates.go
index 952980d..ff7823f 100644
--- a/cmd/commands/templates.go
+++ b/cmd/commands/templates.go
@@ -2,13 +2,13 @@ package commands
// Command example for install command
const example = `
- Install specifc version
+ Install specifc, say, node version
$ ec node@6.4.0
- Choose local version with interactive list
+ Or choose from already installed Go versions
$ ec go
- Choose remote version with interactive list
+ Same way to choose, plus install available Rust versions
$ ec -r rust`
// Help output
diff --git a/cmd/commands/version/verison.go b/cmd/commands/version/verison.go
index caa31dd..65f9aed 100644
--- a/cmd/commands/version/verison.go
+++ b/cmd/commands/version/verison.go
@@ -10,7 +10,7 @@ import (
// Command config
var Command = &cobra.Command{
Use: "version",
- Short: "print version of Eclectica",
+ Short: "print version of eclectica",
Run: run,
}
diff --git a/readme.md b/readme.md
index 15290ee..b9efa84 100644
--- a/readme.md
+++ b/readme.md
@@ -16,12 +16,50 @@
-Eclectica unifies management of any language under one cohesive and minimalistic interface.
-Like [pyenv](https://github.com/pyenv/pyenv) for Python,
-[rbenv](https://github.com/rbenv/rbenv) for Ruby, [nvm](https://github.com/creationix/nvm) Node.js and etc. Managing multiple languages and doing it in a little more enjoyable fashion
+Eclectica unifies management of any language under one cohesive and minimalistic interface. Like [pyenv](https://github.com/pyenv/pyenv) for Python,
+[rbenv](https://github.com/rbenv/rbenv) for Ruby, [nvm](https://github.com/creationix/nvm) Node.js and etc.
-# Install
+But instead of having all of those, you have only one binary
+
+## Usage
+
+After you [install](#install) eclectica, `ec` program will be available in your terminal, I used to have a nice site with fancy animation explaning how to used it, but help output will do too -
+
+```
+$ ec --help
+
+Usage:
+ ec [command] [flags] [@]
+
+Examples:
+ Install specifc, say, node version
+ $ ec node@6.4.0
+
+ Or choose from already installed Go versions
+ $ ec go
+
+ Same way to choose, plus install available Rust versions
+ $ ec -r rust
+
+Available Commands:
+ completion generate the autocompletion script for the specified shell
+ install same as "ec [@]"
+ ls list installed language versions
+ remove-everything removes everything related to eclectica
+ rm remove language version
+ version print version of eclectica
+
+Flags:
+ -h, --help help for ec
+
+Use "ec [command] --help" for more information about a command
+
+```
+
+## Install
+
+Since eclectica is language manager for any language, it should be installed through any package manager :-)
- [go get](#go-get)
- [npm](#npm)