patrickserrano / prompt

A spectacular prompt for *nix distributions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

promptMastermind

A spectacular shell prompt for macOS and *nix distributions

Preview

Vitals

Info Badges
License License
Build Build

Supported Operating Systems

Name Version
macOS Sierra or greater
ubuntu 16.04 or greater
fedora 29 or greater
debian 9 or greater
centOS 7 or greater
mint 19 or greater

Know It

promptMastermind is a prompt for sh, bash, and zsh on *nix distributions that includes a ton of useful functionality, including:

  • A two-line prompt that displays username, hostname, and current path
  • Git prompt support (that emits information about the current branch and status when in a git path)
  • Better tab completion for git and git-flow
  • Installation of dotnet sdk, aws sdk, and gcloud sdk
  • Bookmarking support (cdable variables)
  • Variables support (add vars without modifying profile)
  • Flush DNS (on macOS)
  • Ability to enable and disable hidden files in Finder (on macOS)
  • Display of available colors (already set as variables for use elsewhere)
  • Display currently active Python virtialenv when using pyenv & direnv (bash & zsh)
  • ... and much more!

Note: All "extensions" are implemented as scripts added to the path, so it should not interfere with existing customization (aside from the prompt).

Use It

Install promptMastermind in one step (choose one of the following options):

# install and use bash
curl -fsSL https://git.io/am-prompt | sh -s -- bash

# install and use zsh
curl -fsSL https://git.io/am-prompt | sh -s -- zsh

NOTE: if you do not specify a shell, bash will be used by default

Specific Versions

Although it is NOT recommended, you can install a specific version of prompt using one of the following:

# install and use bash with prompt v6.0.0
curl -fsSL https://git.io/am-prompt | sh -s -- --version v7.0.0 bash

# install and use zsh with prompt v7.0.0
curl -fsSL https://git.io/am-prompt | sh -s -- --version v7.0.0 zsh

All available versions of prompt are available here: https://github.com/automotiveMastermind/prompt/releases

NOTE: zsh is only available as of v7.0.0 -- older versions of prompt only support bash

(Optional) Open an included theme (currently only supported on macOS):

theme monokai # general high quality theme that has been around for many years

OR

theme dark-mode # our own custom theme that is nice and bright for dark mode on macOS

Updating promptMastermind:

update-prompt

If you already have the latest version of prompt installed, the update-prompt command will not re-install the current version.

NOTE: The installer simply creates a new folder (.am) under the home folder and copies all of the files there. It will backup this folder first. It wires up the "extensions" by adding a source command for $HOME/.am/prompt/bashrc to $HOME/.bash_profile. It will not duplicate itself, so you can re-run the installer or use the upgrade-prompt command to upgrade at any time.

The backup folder is located at: $HOME/.am/backup/prompt/[date].

All profile and rc scripts such as $HOME/.bash_profile are also backed up to $HOME/.am/backup/prompt/[date]/.

Build It

In order to test the installation routine for promptMastermind, we use a set of docker images for each of the supported *nix platforms. The build script in the docker/ folder can be used to build all of the images, or specific ones:

# build all of the platforms (this will take a while)
./docker/build.sh

# build the debian and ubuntu platforms
./docker/build.sh debian ubuntu

# build just the mint platform
./docker/build.sh mint

Features

Two-Line Prompt

The first-line displays username, hostname, and current path.

The second-line emits information about the current branch and status when in a git path. If using pyenv and direnv the second-line also displays the currently activated Python virtualenv.

SDK Installs

AWS SDK

install-aws

Google Cloud SDK

install-gcloud

.Net SDK

install-dotnet

Colors

Global colors defined by promotMastermind:

Name Color
CLR_CLEAR DEFAULT COLOR
CLR_BLACK ANSI BLACK (GRAY)
CLR_RED ANSI RED
CLR_GREEN ANSI GREEN
CLR_YELLOW ANSI YELLOW
CLR_BLUE ANSI BLUE
CLR_MAGENTA ANSI MAGENTA (PURPLE)
CLR_CYAN ANSI CYAN
CLR_WHITE ANSI WHITE
CLR_BRIGHT_BLACK BRIGHT BLACK (GRAY)
CLR_BRIGHT_RED BRIGHT RED
CLR_BRIGHT_GREEN BRIGHT GREEN
CLR_BRIGHT_YELLOW BRIGHT YELLOW
CLR_BRIGHT_BLUE BRIGHT BLUE
CLR_BRIGHT_MAGENTA BRIGHT MAGENTA (PURPLE)
CLR_BRIGHT_CYAN BRIGHT CYAN
CLR_BRIGHT_WHITE BRIGHT WHITE

macOS Commands

Show/Hide Files:

# show all hidden files
show-all

# hide all hidden files
hide-all

Flush DNS:

flush-dns

Set Theme to Monokai:

theme monokai # general high quality theme that has been around for many years

Set Theme to Dark Mode

theme dark-mode # our own custom theme that is nice and bright for dark mode on macOS

Pandoc

install-pandoc

*nix Commands

Kubernetes in Docker (Kind)

install-kind

Minkube

install-minikube

Copyright and License

© automotiveMastermind and contributors. Distributed under the MIT license. See LICENSE for details.

About

A spectacular prompt for *nix distributions.

License:MIT License


Languages

Language:Shell 100.0%