Code Monkey home page Code Monkey logo

mybash's Introduction

Overview of ChrisTitusTech's .bashrc Configuration

The .bashrc file is a script that runs every time a new terminal session is started in Unix-like operating systems. It is used to configure the shell session, set up aliases, define functions, and more, making the terminal easier to use and more powerful. Below is a summary of the key sections and functionalities defined in the provided .bashrc file.

Initial Setup and System Checks

  • Environment Checks: The script checks if it is running in an interactive mode and sets up the environment accordingly.
  • System Utilities: It checks for the presence of utilities like fastfetch, bash-completion, and system-specific configurations (/etc/bashrc).

Aliases and Functions

  • Aliases: Shortcuts for common commands are set up to enhance productivity. For example, alias cp='cp -i' makes the cp command interactive, asking for confirmation before overwriting files.
  • Functions: Custom functions for complex operations like extract() for extracting various archive types, and cpp() for copying files with a progress bar.

Prompt Customization and History Management

  • Prompt Command: The PROMPT_COMMAND variable is set to automatically save the command history after each command.
  • History Control: Settings to manage the size of the history file and how duplicates are handled.

System-Specific Aliases and Settings

  • Editor Settings: Sets nvim (NeoVim) as the default editor.
  • Conditional Aliases: Depending on the system type (like Fedora), it sets specific aliases, e.g., replacing cat with bat.

Enhancements and Utilities

  • Color and Formatting: Enhancements for command output readability using colors and formatting for tools like ls, grep, and man.
  • Navigation Shortcuts: Aliases to simplify directory navigation, e.g., alias ..='cd ..' to go up one directory.
  • Safety Features: Aliases for safer file operations, like using trash instead of rm for deleting files, to prevent accidental data loss.
  • Extensive Zoxide support: Easily navigate with z, zi, or pressing Ctrl+f to launch zi to see frequently used navigation directories.

Advanced Functions

  • System Information: Functions to display system information like distribution() to identify the Linux distribution.
  • Networking Utilities: Tools to check internal and external IP addresses.
  • Resource Monitoring: Commands to monitor system resources like disk usage and open ports.

Installation and Configuration Helpers

  • Auto-Install: A function install_bashrc_support() to automatically install necessary utilities based on the system type.
  • Configuration Editors: Functions to edit important configuration files directly, e.g., apacheconfig() for Apache server configurations.

Conclusion

This .bashrc file is a comprehensive setup that not only enhances the shell experience with useful aliases and functions but also provides system-specific configurations and safety features to cater to different user needs and system types. It is designed to make the terminal more user-friendly, efficient, and powerful for an average user.

Setup [Arch]

This sets up mybash for you. It will backup your current bashrc if you already have one.

  1. Create a directory named build in your home directory:
mkdir -p ~/build
  1. Change directory to the build directory:
cd ~/build
  1. Clone the MyBash repository:
git clone https://github.com/christitustech/mybash
  1. Navigate into the MyBash directory:
cd mybash
  1. Run the setup script:
./setup.sh

These commands can be copied individually and executed in your terminal.

mybash's People

Contributors

christitustech avatar joser93 avatar hypeitnow avatar phemto5 avatar jonwin1 avatar kokamisama avatar fearlessgeekmedia avatar aloksingh-rgb avatar augcampos avatar baddylan avatar elomwarren avatar fanieventer avatar l3sp1nk avatar pissedcapslock avatar siaal 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.