Go to file
2021-11-09 16:48:14 -07:00
zsh only fail on known hosts 2021-09-27 13:18:13 -06:00
.gitattributes updated bug with env initialization; updated bug with error message on success 2021-09-16 22:32:28 -06:00
activator.plugin.zsh error suppress option 2021-09-21 12:12:58 -06:00
LICENSE.md mit license 2021-11-01 14:48:07 -06:00
README.md [MISC] Updated README 2021-11-09 16:48:14 -07:00

Code Activator

A zsh utility for terminal-based project navigation

Generic badge

The CODE_ACTIVATOR function facilitates terminal-based project navigation by providing an interactive, fuzzy-search CLI.

Generally, the CLI will activate a project's virtual environment then step into the project root. Once inside a project, the CLI gives the option to deactivate and return to the user's home directory.

Projects can also be quickly cloned or created from scratch by using the clone and new operations respectively.

Use the plugin one of three ways:

  1. Use the shortcut combination (CTRL+SPACE by default)
  2. Use the alias (lkj by default)
  3. Call CODE_ACTIVATOR directly (meant for use as an API)

Installation

  1. install junegunn/fzf
  2. clone this repo, and source the *.plugin.zsh in your zshrc:
# replace <path-to>/code-activator with the appropriate path
git clone https://github.com/w0ryn/code-activator-zsh.git <path-to>/code-activator
echo 'source <path-to>/code-activator' >> $HOME/.zshrc

Configuration

All configuration options are determined by their respective environment variables.

Basic Configuration

Environment Variable Default Description
CODE_ACTIVATOR__SHORTCUT ^@ (a.k.a. CTRL+SPACE) shortcut for running CODE_ACTIVATOR as a plugin
CODE_ACTIVATOR__DISABLE_SHORTCUT 0 (a.k.a. false) whether (or not) the shortcut runner is disabled
CODE_ACTIVATOR__ALIAS lkj easy-to-type alias for running CODE_ACTIVATOR
CODE_ACTIVATOR__DISABLE_ALIAS 0 (a.k.a. false) whether (or not) the alias runner is disabled

Project Directories

  • CODE_ACTIVATOR__DIRS (list) environment variable

A list of fully-qualified paths to project parent directories. Provides ($HOME/Code) as a generic default, but allows for meaningful project grouping:

export CODE_ACTIVATOR__DIRS=(
	"$HOME/Company/Team1"
	"$HOME/Company/Team2"
	"$HOME/Miscellaneous"
	"$HOME/Personal"
)

Known Targets

  • CODE_ACTIVATOR__KNOWN_TARGETS (list) environment variable
  • expects targets to end in : or / character
  • appends environment variable list to the default list

A list of default completion targets for setting up or cloning new repositories. Includes HTTP and GIT protocol targets for GitHub and BitBucket by default, but you may want to add your user to the list:

export CODE_ACTIVATOR__KNOWN_TARGETS=(
	'git@github.com:<your-username>/'
)