A spectacular shell prompt for macOS and *nix distributions
Info | Badges |
---|---|
License | |
Build | |
Releases |
While prompt should run on macOS High Sierra or greater and all Linux distributions with either apt-get or yum, we only validate a few of the most popular.
Name | Version |
---|---|
macOS | 10.15 (Catalina) and 11.0 (Big Sur) |
ubuntu | 16.04 (Xenial Xerus), 18.04 (Bionic Beaver), and 20.04 (Focal Fossa) |
fedora | 32 and 33 |
debian | 9 (Stretch) and 10 (Buster) |
centOS | 8 |
mint | 18 (Sarah), 19 (Tara), and 20 (Ulyana) |
NOTE: not all capabilities are tested. If you discover any bugs or wish to add your favourite distro to the validated list, please create an issue.
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).
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
Although it is NOT recommended, you can install a specific version of prompt using one of the following:
# install and use bash with prompt v7.0.0
curl -fsSL https://git.io/am-prompt | sh -s -- --version v7.0.0 bash
# install and use zsh with prompt v8.0.0
curl -fsSL https://git.io/am-prompt | sh -s -- --version v8.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]/
.
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.
install-aws
install-gcloud
install-dotnet
Global colors defined by promotMastermind:
Name | Color |
---|---|
FORMAT_CLEAR | CLEAR ALL FORMATTING |
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 |
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
install-pandoc
install-kind
© automotiveMastermind and contributors. Distributed under the MIT license. See LICENSE for details.