Breaking
December 22, 2024

Optimizing Your Linux Shell Experience Al Williams | usagoldmines.com

Are you familiar with huffman encoding? That’s where you pick shorter codes for more frequent letters. Morse code is the same way. Shorter characters are the ones you are most likely to use. [Matheus Richard] had the same idea for optimizing your workflow in the Linux shell. The idea is to measure what commands you use the most and make them shorter.

If you use zsh, it is easy to find out what commands you are using the most. If you use bash, [Matheus] helpfully offers a command to give you a similar result (the original post limits the list to the last entry which we are sure is a typo):

history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10

Once you know the commands you use the most, you can use your shell’s aliasing or scripts to shorten them up. For example, in [Matheus’] case, git was a very common command. This led to aliases:

alias gc="git commit --verbose"
alias gp="git push"
alias gprom="git pull --rebase origin main"

Not only does this save typing, but you lessen your chance for typos (git comit, for example). Another idea is to alias your common errors, for example setting an alias for git as gti.

Small things, but definitely time savers. Be sure to read the rest of the post, as there are a number of other optimization ideas. [Matheus] definitely has a thing for zsh, but there are many other shells out there. Some of them are even evolving towards more modern programming languages.

 

This articles is written by : Nermeen Nabil Khear Abdelmalak

All rights reserved to : USAGOLDMIES . www.usagoldmines.com

You can Enjoy surfing our website categories and read more content in many fields you may like .

Why USAGoldMines ?

USAGoldMines is a comprehensive website offering the latest in financial, crypto, and technical news. With specialized sections for each category, it provides readers with up-to-date market insights, investment trends, and technological advancements, making it a valuable resource for investors and enthusiasts in the fast-paced financial world.

Recent:

3D Printed Forklift Is A Cute Desk Toy Lewin Day | usagoldmines.com
240,000 Credit Union Customers Exposed As Hackers Access Trove of Sensitive Data: Report Alex Richar...
Old 3D Printer Parts Repurposed Into DIY Camera Slider Lewin Day | usagoldmines.com
Dog Plays Chess on ESP32 Bryan Cockfield | usagoldmines.com
Vintage Audio Amp Gets LED Lighting Upgrade Lewin Day | usagoldmines.com
Inside a Diamond Plant Al Williams | usagoldmines.com
Nanoscale Imaging and Control of Altermagnetism in MnTe Maya Posch | usagoldmines.com
An LCD, Touch Sensor, USB-C, And A Microcontroller for a Buck Lewin Day | usagoldmines.com
Records of Nearly 1,000,000 Americans Exposed As Massive Data Breach Reveals Names, Phone Numbers, M...
The Bendix G-15 Runs 75,000 Lines of Code Adam Fabio | usagoldmines.com
Over $225,000,000 in Crypto Distributed To Hack Victims of Collapsed Exchange Cryptopia After Years ...
Custom Firmware For Even Cheaper Bluetooth Thermometers Tom Nardi | usagoldmines.com
8,358 Bank Customers Exposed As Billion-Dollar Lender Reveals Data Breach, Warns Social Security Num...
Intel Terminates X86S Initiative After Formation of New Industry Group Maya Posch | usagoldmines.com
Building A Custom Swiss Army Knife Lewin Day | usagoldmines.com
Training a Self-Driving Kart Bryan Cockfield | usagoldmines.com
JPMorgan Chase Refuses To Reimburse Customer After $7,000 Abruptly Drained From Bank Account: Report...
US Banks Witness 1,000% Surge in Digital Scams As JPMorgan Chase, Wells Fargo and Bank of America Cu...
Man Posing As Uber Driver Allegedly Steals Over $300,000 in Crypto From Unsuspecting Passengers: Rep...
Nigeria Arrests Nearly 800 Over ‘Pig Butchering’ Crypto Scam Targeting North Americans and Europeans...
Crypto Platforms Suffered $2,200,000,000 in Losses From Hacks in 2024 – But There’s a Catch: Chainal...
3D Printing A Big Lego Christmas Tree Lewin Day | usagoldmines.com
It’s Official: The North Pole is Moving Al Williams | usagoldmines.com
Rudolph’s Sleigh on a North Pole PCB Heidi Ulrich | usagoldmines.com
Making a Mechanical Watch From Scratch Is Fine Work Lewin Day | usagoldmines.com
Building a Diet Coke Button Lewin Day | usagoldmines.com
Embossing Leather With a Pipe Bender and 3D Printed Tooling Lewin Day | usagoldmines.com
Hackaday Podcast Episode 301: Hacking NVMe into Raspberry Pi, Lighting LEDs with Microwaves, and How...
Subchannel Stations: The Radio Broadcasts You Didn’t Know Were There Lewin Day | usagoldmines.com
Multimeter Gets Socket Upgrade To Use Nicer Probes Lewin Day | usagoldmines.com
Watch a 3D Scan Become a Car Body Model Donald Papp | usagoldmines.com
Old BBC Micro Gets Some Disk Help From A Raspberry Pi Lewin Day | usagoldmines.com
Getting Dial-Up To Work Over VOIP Isn’t Always Easy Lewin Day | usagoldmines.com
Fixing 1986 Sinclair Spectrum+2 With a High-Score of Issues Maya Posch | usagoldmines.com
Fibonacci Clock Looks Like Beautiful Modern Art Lewin Day | usagoldmines.com
Measuring a Well with Just a Hammer and a Smartphone Dan Maloney | usagoldmines.com
The Battle Over Vanishing Spray Lewin Day | usagoldmines.com
Better C Strings, Simply Al Williams | usagoldmines.com
Human Civilization and the Black Plastic Kitchen Utensils Panic Maya Posch | usagoldmines.com
Where This Xmas Card’s Going, We Don’t Need Batteries! Jenny List | usagoldmines.com
Homebrew Electron Beam Lithography with a Scanning Electron Microscope Dan Maloney | usagoldmines.co...
Back to the Future of Texting: SMS on a Panasonic Typewriter Heidi Ulrich | usagoldmines.com
Bacterium Demonstrates Extreme Radiation Resistance Courtesy of an Antioxidant Maya Posch | usagoldm...
Simple Fluorometer Makes Nucleic Acid Detection Cheap and Easy Dan Maloney | usagoldmines.com
FLOSS Weekly Episode 813a: Happy Holidays! Jonathan Bennett | usagoldmines.com
Push for On, Hold for Off, AC Edition Al Williams | usagoldmines.com
Upper Room UV-C Keeps Air Cleaner Lewin Day | usagoldmines.com
Enabling NVMe on the Raspberry Pi 500 With a Handful of Parts Maya Posch | usagoldmines.com
Why Did Early CD-ROM Drives Rely On Awkward Plastic Caddies? Lewin Day | usagoldmines.com
Catching the View from the Edge of Space Dan Maloney | usagoldmines.com
Learning About The Flume Water Monitor Lewin Day | usagoldmines.com
Pulling Backward to Go Forward: The Brennan Torpedo Explained Donald Papp | usagoldmines.com
The World Morse Code Championship Al Williams | usagoldmines.com
PCB Motor Holds Fast, Even After 1.6 Billion Spins Donald Papp | usagoldmines.com
A Compass That Looks to the Stars Bryan Cockfield | usagoldmines.com
Why NASA Only Needs Pi To So Many Decimal Places Lewin Day | usagoldmines.com
Tech in Plain Sight: Table Saw Safety Al Williams | usagoldmines.com
The Last Acorn BBC Computer Wasn’t a BBC Micro Jenny List | usagoldmines.com
Man Overboard Systems Aim To Increase Survival Rates At Sea Lewin Day | usagoldmines.com
See What ‘They’ See In Your Photos Lewin Day | usagoldmines.com
3D Printed Blaster Does it with Compliant Components Donald Papp | usagoldmines.com
Robot Air Hockey Player Predicts Your Next Move Lewin Day | usagoldmines.com
Versatile, yet Grounded: The Rotodyne Revisited Heidi Ulrich | usagoldmines.com
Emulating The Battery Controller In An Ancient Acer PDA Lewin Day | usagoldmines.com
Using A Smartphone As A Touchscreen For Arduino Lewin Day | usagoldmines.com
3D-Printed Boat Feeds The Fishes Lewin Day | usagoldmines.com
Sony Vaio Revived: How Does One Start? Arya Voronova | usagoldmines.com
A Red Ring Light Show For Your Xbox 360 Lewin Day | usagoldmines.com
Keebin’ with Kristina: the One With the Curvy Centerfold Kristina Panos | usagoldmines.com
Building the Spectacular Fibonacci128 Simple Add-On Tom Nardi | usagoldmines.com
Single Crystal Electrode Lithium Ion Batteries Last a Long Time Al Williams | usagoldmines.com
Documented Source Code for Elite on the C64, BBC Micro and Others Maya Posch | usagoldmines.com
Finally… a Man Page for Life Al Williams | usagoldmines.com
Hackaday Links: December 15, 2024 Dan Maloney | usagoldmines.com
Rainwater From the Road to the Garden Bryan Cockfield | usagoldmines.com
Wago Terminals Make This Ham Radio Dipole Light and Packable Dan Maloney | usagoldmines.com
An iPhone Case Study Bryan Cockfield | usagoldmines.com
ESP8266 Keeps Tabs on Wood Stove Temperature Tom Nardi | usagoldmines.com
Running Fusion 360 on Linux with Wine Maya Posch | usagoldmines.com
A Portable Chainsaw Sawmill Bryan Cockfield | usagoldmines.com
Might Morphin’ Antenna Al Williams | usagoldmines.com
How the Lost Mystery Pigment ‘Maya Blue’ Got Recreated Donald Papp | usagoldmines.com
Behold a Geared, Continuously Variable Transmission Donald Papp | usagoldmines.com
tldr-pages Keeps it Short, Wherever You Need It Tom Nardi | usagoldmines.com
Hacker Tools, Hacked Tools Elliot Williams | usagoldmines.com
A Self Balancing Bike for Crash Dummy Billy Al Williams | usagoldmines.com
Personal Traffic Light Stops Them In Their Tracks Kristina Panos | usagoldmines.com
Origami-Inspired, Self-locking Structures With 3D Printing Donald Papp | usagoldmines.com
Walkie Talkies, Jedi Style: Building a Communicator Heidi Ulrich | usagoldmines.com
Flashy Paper Christmas Tree Does It With a 555 Kristina Panos | usagoldmines.com
Apple Newton Gets Rebuilt Battery Pack Bryan Cockfield | usagoldmines.com
The Stern-Gerlach Experiment Misunderstood Al Williams | usagoldmines.com
Hack On Self: How’d My Day Go? Arya Voronova | usagoldmines.com
Saving an Electron Microscope from the Trash Maya Posch | usagoldmines.com
Hackaday Podcast Episode 300: The Dwingeloo 25 m Dish, a Dead-Tech Twofer, and Deconstructing PCBs K...
This Week in Security: Recall, BadRAM, and OpenWRT Jonathan Bennett | usagoldmines.com
Chirality Could Kill Us All, If We Let It Jenny List | usagoldmines.com
Use Your RTL, In The Browser Jenny List | usagoldmines.com
Automated Rig Grows Big, Beautiful Crystals Fast Dan Maloney | usagoldmines.com
A Look Back at Google’s 2015 Chromecast Maya Posch | usagoldmines.com

Leave a Reply