Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions details.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ $ git checkout main
You might not need all the things that cli-config installs. To see the list of tools available pass the `--help` switch.
You can pass the list of tools to install with the `-t` or `--tools` switch, like so
```bash
$ ./cli-config install --tools antigen,nvm,ohmyposh
$ ./cli-config install --tools zimfw,asdf,ohmyposh
```

3. Run the setup again

After thinking about it, I've decided that cli-config should retain the older installation even if you run `./cli-config` multiple times. So, incase you want to reinstall any tool, you can delete that folder or the entire `current` folder before running setup again. (Example: If you want to reinstall nvm, delete the `current/nvm` folder and run `cli-config` again)
After thinking about it, I've decided that cli-config should retain the older installation even if you run `./cli-config` multiple times. So, incase you want to reinstall any tool, you can delete that folder or the entire `current` folder before running setup again. (Example: If you want to reinstall asdf, delete the `current/asdf` folder and run `cli-config` again)
1 change: 0 additions & 1 deletion profiles/mrsauravsahu/.zshrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ANTIGEN_LOG=false
# vim: set filetype=zsh :
# zmodload zsh/zprof
HOMEBREW_NO_AUTO_UPDATE=1
Expand Down
11 changes: 3 additions & 8 deletions readme.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,9 @@ Once the setup is done, your `~/.zshrc` will be symlinked to the [default profil
### Basics
- [ohmyzsh](https://github.com/ohmyzsh/ohmyzsh) for zsh plugins
- [oh-my-posh](https://github.com/JanDeDobbeleer/oh-my-posh) for prompt customization and theming
- [antigen](https://github.com/zsh-users/antigen) for more plugins 😉

### Programming Support
- [nvm](https://github.com/nvm-sh/nvm) for managing multiple node versions
- [pyenv](https://github.com/pyenv/pyenv) for multiple python versions
- [dotnet](https://github.com/dotnet/core)
- [tfenv](https://github.com/tfutils/tfenv) manage multiple terraform versions
- [asdf](https://github.com/asdf-vm/asdf) single version manager for every runtime (node, python, go, dotnet, terraform, ...) via plugins

### Helpers and Goodies
- [direnv](https://github.com/direnv/direnv)
Expand All @@ -94,13 +90,12 @@ Once the setup is done, your `~/.zshrc` will be symlinked to the [default profil


## What's new? 🎉
- Manage multiple terraform version with [tfenv](https://github.com/tfutils/tfenv).
- Runtime versions are managed solely by [asdf](https://github.com/asdf-vm/asdf) - the nvm, pyenv, gvm, tfenv and dotnet installers have been removed.
- Theming & Prompt customization support with [oh-my-posh](https://github.com/JanDeDobbeleer/oh-my-posh).
- Fresh new installation experience, powered by [Bash oo Framework](https://github.com/niieani/bash-oo-framework).
- Switch antigen themes with a single env variable `CLI_CONFIG_THEME`
- Switch oh-my-posh themes with a single env variable `CLI_CONFIG_THEME`
- Extra tools available for Linux as well! Check out the [package list](extras/apt-list.txt).
- New extras package - [tmux](https://github.com/tmux/tmux/wiki)
- Setup apps and cool goodies on macOS with brew. Checkout the [extras](extras/setup.sh) script.
- Support for .nvmrc - set node version for a particular directory!

\-S
2 changes: 1 addition & 1 deletion src/defs/configure.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ configure() {
# load cli-config env variables
. ${CLI_CONFIG_ROOT}/src/scripts/env.zsh

programs=('asdf' 'zimfw' 'ohmyzsh' 'ohmyposh' 'nvm' 'pyenv' 'dotnet' 'tfenv' 'gvm' 'zsh-plugins')
programs=('asdf' 'zimfw' 'ohmyzsh' 'ohmyposh' 'zsh-plugins')
for item in ${programs[@]}; do
Log "Updating configuration for cli-config/${item}"
if [ -d "${CLI_CONFIG_ROOT}/current/${item}" ]; then
Expand Down
25 changes: 3 additions & 22 deletions src/defs/usage.zsh
Original file line number Diff line number Diff line change
@@ -1,38 +1,19 @@
#!/usr/bin/env bash

. ${CLI_CONFIG_ROOT}/src/utils/array.zsh
. ${CLI_CONFIG_ROOT}/src/utils/tool-guards.zsh

usage() {
modes=('install' 'configure' 'uninstall')
profiles=($(ls -1 "${CLI_CONFIG_ROOT}/profiles"))
all_tools=$(ls -1 $CLI_CONFIG_ROOT/src/installers | sed 's/\..*$//g' | sort | uniq)
active_tools=()
deprecated_tools_found=()

while IFS= read -r tool; do
local is_deprecated=false
for d in "${DEPRECATED_TOOLS[@]}"; do
[[ "$tool" == "$d" ]] && is_deprecated=true && break
done
if $is_deprecated; then
deprecated_tools_found+=("$tool")
else
active_tools+=("$tool")
fi
done <<<"$all_tools"
tools=($(ls -1 $CLI_CONFIG_ROOT/src/installers | sed 's/\..*$//g' | sort | uniq))

modes_str=$(array_str ", " "${modes[@]}")
profiles_str=$(array_str "/" "${profiles[@]}")
active_tools_str=$(array_str "," "${active_tools[@]}")
deprecated_tools_str=$(array_str "," "${deprecated_tools_found[@]}")
plugin_managers_str=$(array_str "/" "${PLUGIN_MANAGERS[@]}")
tools_str=$(array_str "," "${tools[@]}")

echo "cli-config <mode> [-p|--profile=profileName] [-t|--tools=tool1,tool2]"
printf "\n"
echo "mode: ${modes_str} "
echo "profile: ${profiles_str} "
printf "tools: ${active_tools_str}\n"
printf " plugin manager (choose one, default: ${PLUGIN_MANAGER_DEFAULT}): ${plugin_managers_str}\n"
printf " deprecated (use ${DEPRECATED_TOOLS_REPLACEMENT} instead): ${deprecated_tools_str}\n"
printf "tools: ${tools_str}\n"
}
21 changes: 0 additions & 21 deletions src/extras/nvmrc-support.zsh

This file was deleted.

6 changes: 0 additions & 6 deletions src/installers/dotnet.configure.zsh

This file was deleted.

11 changes: 0 additions & 11 deletions src/installers/dotnet.install.zsh

This file was deleted.

10 changes: 0 additions & 10 deletions src/installers/gvm.configure.zsh

This file was deleted.

32 changes: 0 additions & 32 deletions src/installers/gvm.install.zsh

This file was deleted.

9 changes: 0 additions & 9 deletions src/installers/nvm.configure.zsh

This file was deleted.

16 changes: 0 additions & 16 deletions src/installers/nvm.install.zsh

This file was deleted.

8 changes: 0 additions & 8 deletions src/installers/pyenv.configure.zsh

This file was deleted.

31 changes: 0 additions & 31 deletions src/installers/pyenv.install.zsh

This file was deleted.

6 changes: 0 additions & 6 deletions src/installers/tfenv.configure.zsh

This file was deleted.

10 changes: 0 additions & 10 deletions src/installers/tfenv.install.zsh

This file was deleted.

4 changes: 1 addition & 3 deletions src/utils/read-options.zsh
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
read_options() {
. $CLI_CONFIG_ROOT/src/utils/tool-guards.zsh

# DEFAULT OPTIONS
CCOPT_PROFILE=default
CCOPT_NO_SUDO='sudo'
CCOPT_DEBIAN_FRONTEND=''
CCOPT_TOOLS=('zimfw' 'ohmyposh' 'asdf' 'dotnet')
CCOPT_TOOLS=('zimfw' 'ohmyposh' 'asdf')

# READ OPTIONS
# Todo: Move to separate file
Expand Down Expand Up @@ -55,7 +54,6 @@ read_options() {
exit
fi

validate_tools "${CCOPT_TOOLS[@]}"
shift
shift
;;
Expand Down
35 changes: 0 additions & 35 deletions src/utils/tool-guards.zsh

This file was deleted.