Giter Club home page Giter Club logo

xelabash's Introduction

xelabash

xelabash

A few simple, no-nonsense, non-distracting additions to the standard bash prompt.

Features

  • Compact, minimalist, single-line prompt, featuring:
    • Red $ (or #, if root) in prompt following an error
    • user@hostname, but only when in a remote session
    • Git branch and working copy dirty status, when in a Git repo
    • Active Kubernetes context and namespace
  • "Better"-than-default autocomplete settings
  • Not overly opinionated; designed to integrate with other settings and tools if desired

Install and Setup

Works best with bash 4.4+. There are no dependencies to install.

To install, simply clone this repo and source xela.bash in your .bash_profile. (If .bash_profile doesn't work, try .bashrc.)

cd
git clone --depth=1 https://github.com/aelindeman/xelabash "${XDG_DATA_HOME:-~/.local/share}/xelabash"
echo 'source "${XDG_DATA_HOME:-~/.local/share}/xelabash/xela.bash"' >> .bash_profile

Xelabash will load configuration files from the config.d/ folder in this repository, so you can fork this repo and add your own aliases, configs, functions, environment variables, or whatever else you need.

Git and Kubernetes prompt pieces are opt-in. Just set GIT_PROMPT=true and/or KUBE_PROMPT=true before you load Xelabash:

GIT_PROMPT=true
KUBE_PROMPT=true
source ~/.local/share/xelabash/xela.bash

Alternatively, if you don't want to always see them, use a tool like direnv to set those environment variables conditionally based on your working directory.

More pictures

  • Full cwd

    dir

  • Git status and branch

    git

  • Kubernetes context (and namespace, if set)

    kube

  • Last process exit status

    exit

  • Username and hostname, when connected via ssh

    ssh

  • ...and they all work in combination with each other

    combo

xelabash's People

Contributors

aelindeman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.