• About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us
AimactGrow
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing
No Result
View All Result
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing
No Result
View All Result
AimactGrow
No Result
View All Result

Ars Asks: Share your shell and present us your tricked-out terminals!

Admin by Admin
May 11, 2026
Home Technology
Share on FacebookShare on Twitter


The timer_stop operate additionally has the job of changing the timer right into a human-readable format, and it’s most likely messier than it must be. I’m no developer, although, so that is what Previous Lee settled on after a number of hours of looking out via examples.

Doing it in fish for folk like me

That’s for bash once I’m ssh’d into one in all my Linux hosts, however I run fish on MacOS. I’ve a separate fish operate for getting the identical outcomes there, full with gross hacks for turning the measurement into human-readable type. I made this code, and I’m unapologetic. Witness my cobbled-together StackOverflow-sourced kludge.

operate fish_prompt --description 'Write out the immediate'
    # Save the final standing
    set -l last_status $standing

    # Calculate the command length if accessible
    set -l cmd_duration ""
    if set -q CMD_DURATION
        # Convert milliseconds to microseconds for extra exact comparability
        set -l duration_us (math "$CMD_DURATION * 1000")

        # Calculate completely different time models
        set -l us (math "$duration_us % 1000")
        set -l ms (math "ground($duration_us / 1000) % 1000")
        set -l s (math "ground($duration_us / 1000000) % 60")
        set -l m (math "ground($duration_us / 60000000) % 60")
        set -l h (math "ground($duration_us / 3600000000)")

        # Format length string
        if take a look at $h -gt 0
            set cmd_duration (string be part of '' "(" $h "h" $m "m)")
        else if take a look at $m -gt 0
            set cmd_duration (string be part of '' "(" $m "m" $s "s)")
        else if take a look at $s -ge 10
            set -l fraction (math "ground($ms / 100)")
            set cmd_duration (string be part of '' "(" $s "." $fraction "s)")
        else if take a look at $s -gt 0
            set cmd_duration (string be part of '' "(" $s "." (printf "%03d" $ms) "s)")
        else if take a look at $ms -ge 100
            set cmd_duration (string be part of '' "(" $ms "ms)")
        else if take a look at $ms -gt 0
            set -l fraction (math "ground($us / 100)")
            set cmd_duration (string be part of '' "(" $ms "." $fraction "ms)")
        else
            set cmd_duration (string be part of '' "(" $us "us)")
        finish
    finish

    # Outline unicode symbols for standing
    set -l checkmark "✓"
    set -l cross "✗"

    # Colours
    set -l regular (set_color regular)
    set -l dark_gray (set_color 555555)
    set -l blue (set_color -o blue)
    set -l pink (set_color pink)
    set -l inexperienced (set_color inexperienced)
    set -l purple (set_color -o purple)

    # First line
    echo # New line
    echo -n -s $dark_gray "["(date +%T)"] $last_status " # Time in brackets and exit standing

    # Standing indicator with exit standing
    if take a look at $last_status -eq 0
        echo -n -s $inexperienced $checkmark
    else
        echo -n -s $pink $cross
    finish

    # Truly echo the length
    echo -n -s $dark_gray " $cmd_duration"

    # Do the remainder of the immediate
    echo
    set -l host_color $purple
    echo -n -s $host_color $USER "@" (prompt_hostname) $regular ":" $blue (prompt_pwd) $regular " $ "
finish

A splash of shade

Spending my childhood immersed in ANSI BBS graphics has most likely made me a little bit extra fond of colourful textual content in my terminal than the common frumpy, button-downed admin. Look, I do know some people really feel that syntax highlighting and colours typically kill comprehension and encourage skimming, however what can I say? I really like them and depend on them. Maybe I skim an excessive amount of, however so be it. You may take my colourful shell instruments from my chilly, useless palms.

To that finish, I lean on a little bit program referred to as GRC (for Generic Colorizer) so as to add highlighting and coloration to different instruments. It’s broadly accessible and works with none extra configuration.


Image showing the before and after of using GRC with ping

Nothing unsuitable with a little bit shade!

Lee Hutchinson

Nothing unsuitable with a little bit shade!

Lee Hutchinson


Image showing the before and after of using ip a with ping

Nothing unsuitable with a little bit shade!

Lee Hutchinson

There’s a little bit of aliasing (which I hold in .bash_aliases like a great citizen) to make colourful output the defaults on some frequent instructions:

    alias ls="ls --color=auto"
    alias ll="ls -AlFh --group-directories-first"
    alias df="grc df -h"
    alias du='grc du -h'
    alias free="grc free -h"
    alias ping='grc ping'
    alias traceroute="grc traceroute"
    alias ip='grc ip'

I’m additionally a giant fan of constructing my numbers human-readable, and the -h change is due to this fact utilized liberally.

(Do word that wrapping instructions like ip in GRC can typically do bizarre issues when you’re piping its output into one thing else. Use warning. Or don’t! It’s your pc, knock your self out!)

The terminal itself

Sharp-eyed readers will word from the screenshots that I’m utilizing MacOS’s Terminal.app for my terminal program, regardless of there being much better choices. I suppose the excuse I’ve is that I’m cozy with Terminal.app and nothing has pulled me off of it. I’ve test-driven the standard suspects—Ghostty, Alacritty, the mighty iTerm2 with its superior tmux windowing integration, and even fancy new reinterpretations of the terminal expertise like Warp.

Tags: ArsAsksShareShellShowterminalstrickedout
Admin

Admin

Next Post
The right way to create a technique for subject authority in 2026

The right way to create a technique for subject authority in 2026

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended.

Use Semrush to Benchmark Model Mentions in AI Solutions

Use Semrush to Benchmark Model Mentions in AI Solutions

January 13, 2026
Airport Cyberattack Disrupts Extra Flights Throughout Europe

Airport Cyberattack Disrupts Extra Flights Throughout Europe

September 21, 2025

Trending.

Nsfw Chatgpt Options – Examples I’ve Used

Nsfw Chatgpt Options – Examples I’ve Used

October 13, 2025
Digital Detox & Display Time Statistics 2025

Digital Detox & Display Time Statistics 2025

March 28, 2026
How creators and entrepreneurs are utilizing AI to hurry up & succeed [data]

How creators and entrepreneurs are utilizing AI to hurry up & succeed [data]

June 17, 2025
Web Information Caps Defined: The right way to Keep away from Overages and Discover Limitless Plans

Web Information Caps Defined: The right way to Keep away from Overages and Discover Limitless Plans

September 23, 2025
All Overwatch 2 Dokiwatch Skins, Title Playing cards, And Cosmetics

All Overwatch 2 Dokiwatch Skins, Title Playing cards, And Cosmetics

April 24, 2025

AimactGrow

Welcome to AimactGrow, your ultimate source for all things technology! Our mission is to provide insightful, up-to-date content on the latest advancements in technology, coding, gaming, digital marketing, SEO, cybersecurity, and artificial intelligence (AI).

Categories

  • AI
  • Coding
  • Cybersecurity
  • Digital marketing
  • Gaming
  • SEO
  • Technology

Recent News

Holding Knowledge-Pushed Content material Recent Was a Month-to-month Slog. So We Taught an Agent to Do It.

Holding Knowledge-Pushed Content material Recent Was a Month-to-month Slog. So We Taught an Agent to Do It.

June 25, 2026
Microsoft quietly extends the Prolonged Safety Updates program for Home windows 10 shoppers by a yr, letting eligible customers get updates by means of October 12, 2027 (Zac Bowden/Home windows Central)

Microsoft quietly extends the Prolonged Safety Updates program for Home windows 10 shoppers by a yr, letting eligible customers get updates by means of October 12, 2027 (Zac Bowden/Home windows Central)

June 25, 2026
  • About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us

© 2025 https://blog.aimactgrow.com/ - All Rights Reserved

No Result
View All Result
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing

© 2025 https://blog.aimactgrow.com/ - All Rights Reserved