Welcome to my customized .bashrc
! This configuration file comes with some awesome features that enhance your terminal experience. Here's an overview of what's inside:
Ever wondered how long a command takes to run? This .bashrc
includes a timer that calculates and displays the duration of each command.
- How it works:
- A timer starts automatically when a command is executed.
- When the command finishes, the duration is displayed in the prompt in hours, minutes, and seconds.
- Example Prompt:
[1m 45s]
Know immediately if your last command succeeded or failed.
- How it works:
- The exit code of the last command is displayed in red if non-zero (error), or omitted if the command succeeded.
- Example Prompt:
(indicating an error with exit code 127 - command not found).
Your terminal prompt is informative and colorful, showing:
- Current time β°
- Username and hostname π€
- Current working directory π
- Git branch (if inside a Git repository) πΏ
Example:
[1m 45s][14:32:12] user@hostname:/path/to/dir (main)$
Bash completion is enabled for easier command navigation.
If you type a command that doesn't exist, this configuration provides helpful suggestions (if the command-not-found
package is installed).
Navigate your file system with ease using colorful output and handy aliases:
l
- List all files in long format.ll
- Same asls -l
.lt
- Sort files by modification time.la
- List all files, including hidden ones.lh
- Display sizes in human-readable format.lat
- Detailed listing with permissions, sizes, and timestamps.
The .bashrc
dynamically adds the Go binaries directory to your PATH
if Go is installed.
Sets vim
as the default editor for both EDITOR
and VISUAL
environment variables.
Allows aliases to work even when using sudo
.
sudo apt update && sudo apt install -y vim git bash-completion
- Copy the
.bashrc
file to your home directory:cp .bashrc ~/.bashrc
- Reload your
.bashrc
:source ~/.bashrc
inputrc
If it interests you, Iβve also included my inputrc
file for enhanced input behavior in the terminal. Feel free to check it out!
Feel free to submit pull requests or open issues if you have suggestions or improvements.
This .bashrc
configuration is open-source and available under the MIT License.
Enjoy your enhanced terminal experience! π