Ultimate ZSH Prompt

2025-01-23T23:12:09+05:30 | 2 minute read | Updated at 2025-01-23T23:12:09+05:30

@

The .zshrc 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 .zshrc file.

Setup

This sets up myZSH for you. It will backup your current .zshrc if you already have one.

curl -fsSL https://raw.githubusercontent.com/its-ashu-otf/myZSH/main/Install-myZSH.sh | bash

render1734625237861

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 lsgrep, 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 zzi, 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.

Conclusion

This .zshrc 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.

“Want to supercharge your terminal experience? Check out myZSH on GitHub and give it a ⭐ if you find it useful!”

© 2025 Ashu's 0Day Arsenal

Website Made by @its-ashu-otf :: All Right's Reserved ©

About Me

👋  Hi, I’m Ashutosh Gupta from Mumbai.
👀  I’m Studying Cyber Security.
🧠  I’m Currently Learning Securing Windows, Linux Systems, Red Teaming and Web Application Pentesting.

Hobbies

🎮  When I’m not pentesting or studying, I love playing FPS and story games also exploring tech blogs.

Skills & Tools
  • Operating Systems: Windows, Linux, Android and macOS
  • Pentesting Tools: Burp Suite, Metasploit, Nmap, Wireshark
  • Programming: Python, Bash Scripting, Batch Scripting, C/C++, C# , HTML, CSS and Powershell
  • Frameworks: OWASP Top 10
Education
  • SSC from St. John English High School
  • HSC from Thakur College of Commerce & Science
  • Bachelor Of Science in Information Technology from Nirmala Memorial Foundation
Certifications
  • Python
  • Certified Cyber Security and Ethical Hacker
  • Certified Ethical Hacker v13 (CEHv13) (In Progress)
Social Links