{"slug": "the-shell-you-know-vs-the-shell-you-deserve", "title": "The Shell You Know vs The Shell You Deserve", "summary": "Developer Maneshwar is building git-lrc, a free and source-available micro AI code reviewer that runs on every commit. In a blog post, they share advanced command-line tricks including ctrl-r for history search, xargs for argument passing, and set -euo pipefail for robust Bash scripting.", "body_md": "*Hello, I'm Maneshwar. I'm building git-lrc, a Micro AI code reviewer that runs on every commit. It is free and source-available on Github. Star git-lrc to help devs discover the project. Do give it a try and share your feedback.*\n\nYou've been using the terminal for months/ years.\n\nMaybe you `cd`\n\ninto a folder, `ls`\n\naround, run your script, and call it a day. That's fine.\n\nThat's like knowing how to boil water and calling yourself a chef.\n\nBut the terminal has *layers*.\n\nIt's basically an onion that occasionally makes you cry, usually around 12 AM when a script fails silently and you have no idea why.\n\nSo grab your coffee and let's talk about the command line tricks that actually make your life better.\n\nNot the \"did you know `ls -la`\n\nshows hidden files\" tier tips.\n\nMost devs mash the up arrow like it's 2007 and they're trying to beat a Flash game. Stop that. Press `ctrl-r`\n\ninstead.\n\nIt searches your command history live. Type a few letters, it finds the last matching command. Press `ctrl-r`\n\nagain to cycle back further. Found it? Hit Enter to run it, or the right arrow to drop it into your prompt so you can edit it first.\n\n```\nctrl-r\n(reverse-i-search)`docker run`: docker run -it --rm -v $(pwd):/app node:20 bash\n```\n\nPair this with `ctrl-w`\n\n(delete last word) and `ctrl-u`\n\n(nuke the line back to the cursor) and you'll start editing commands like you're speedrunning a text adventure.\n\nAnd if you're the type who types a whole essay of a command and then realizes you forgot something at the start, `ctrl-a`\n\njumps to the beginning of the line and `ctrl-e`\n\njumps to the end. No more holding the left arrow key like it owes you money.\n\nPro tip: if you're a TUI fan and ctrl-r's default search feels a bit flat, check out [McFly](https://github.com/cantino/mcfly)\n\n`xargs`\n\nIs The Friend Who Actually Shows Up\nPipes (`|`\n\n) are great. They pass output from one command into another.\n\nBut sometimes you don't want to pass output as *input*, you want to pass it as *arguments*.\n\nThat's where `xargs`\n\ncomes in, and once you get it, you will not shut up about it to your coworkers.\n\n```\nfind . -name '*.py' | xargs grep some_function\n```\n\nThis finds every Python file and then greps inside each one for `some_function`\n\n.\n\nWithout `xargs`\n\n, `grep`\n\nwould just sit there waiting for the file list to be typed into stdin like it's a hostage negotiation.\n\nWant to run something on a bunch of remote servers?\n\n```\ncat hosts | xargs -I{} ssh root@{} master\n```\n\nThe `-I{}`\n\nbit lets you place each item wherever you want in the command, not just at the end.\n\nIt's the difference between a command that follows orders and a command that actually understands the assignment.\n\nIf you're not 100% sure `xargs`\n\nis going to do what you think, run it through `echo`\n\nfirst as a dry run:\n\n```\nfind . -name '*.log' | xargs echo rm\n```\n\nLook before you leap. Or in this case, look before you `rm`\n\n.\n\nRemember Venn diagrams from school? Turns out `sort`\n\nand `uniq`\n\ncan do union, intersection, and difference on text files, and it scales to files way bigger than your RAM because `sort`\n\ndoesn't need to hold everything in memory at once.\n\n```\nsort a b | uniq > c        # union: everything in a or b\nsort a b | uniq -d > c     # intersection: only in both\nsort a b b | uniq -u > c   # difference: only in a, not b\n```\n\nThat last one is sneaky clever.\n\nListing `b`\n\ntwice means anything from `b`\n\nshows up at least twice, so `uniq -u`\n\n(which only prints lines that appear exactly once) filters it right out, leaving only stuff unique to `a`\n\n.\n\nThis is genuinely useful for things like comparing two lists of usernames, config keys, or \"which servers are in prod but not in staging.\"\n\nNo Python script needed.\n\nJust good old fashioned sorting.\n\nHere's a thing that will save you actual hours of debugging: start your Bash scripts with this.\n\n```\nset -euo pipefail\ntrap \"echo 'error: Script failed: see failed command above'\" ERR\n```\n\nBreaking it down:\n\n`-e`\n\nexits immediately if any command fails`-u`\n\nerrors out if you reference an unset variable, instead of silently treating it as empty`-o pipefail`\n\nmakes a pipeline fail if `trap`\n\nprints a clear message when something goes wrong, so you're not left squinting at the last visible line of output wondering what happened three commands agoWithout this, a script can quietly march past a failed step like nothing happened, and you won't find out until three steps later when everything is on fire.\n\nWith it, the script stops and yells at you immediately, which honestly is the kind of tough love we all need sometimes.\n\nIf you just want a quick reminder of how to use a command without opening a novel-length man page, try this:\n\n```\ncurl cheat.sh/tar\n```\n\nSwap `tar`\n\nfor basically any command and you'll get a short, practical cheat sheet with real examples.\n\nIt's like having a senior dev who answers instantly and never gets annoyed at you for asking the same question twice.\n\nNone of this is magic. It's mostly just muscle memory and knowing your tools have more depth than the five commands you learned in your first week of using Linux.\n\nThe terminal isn't scary, it's just underexplored, kind of like the settings menu on your TV.\n\nIf you want the extended version of basically everything above and then some, [The Art of Command Line](https://github.com/jlevy/the-art-of-command-line) on GitHub is the OG I'm riffing on.\n\nBookmark it, actually read it once, and you'll be dangerously productive.\n\nNow go forth and pipe responsibly xD\n\nDisclaimer: This article was written by me; AI was used to fix grammar and improve readability.\n\nAI agents write code fast. They also silently remove logic, change behavior, and introduce bugs — without telling you. You often find out in production.\n\ngit-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.\n\nAny feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.\n\n⭐ Star it on GitHub:\n\n| [🇩🇰 Dansk](https://github.com/HexmosTech/git-lrc/readme/README.da.md) | [🇪🇸 Español](https://github.com/HexmosTech/git-lrc/readme/README.es.md) | [🇮🇷 Farsi](https://github.com/HexmosTech/git-lrc/readme/README.fa.md) | [🇫🇮 Suomi](https://github.com/HexmosTech/git-lrc/readme/README.fi.md) | [🇯🇵 日本語](https://github.com/HexmosTech/git-lrc/readme/README.ja.md) | [🇳🇴 Norsk](https://github.com/HexmosTech/git-lrc/readme/README.nn.md) | [🇵🇹 Português](https://github.com/HexmosTech/git-lrc/readme/README.pt.md) | [🇷🇺 Русский](https://github.com/HexmosTech/git-lrc/readme/README.ru.md) | [🇦🇱 Shqip](https://github.com/HexmosTech/git-lrc/readme/README.sq.md) | [🇨🇳 中文](https://github.com/HexmosTech/git-lrc/readme/README.zh.md) | [🇮🇳 हिन्दी](https://github.com/HexmosTech/git-lrc/readme/README.hi.md) |\n\nGenAI today is a **race car without brakes**. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents *silently break things*: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.\n\n** git-lrc is your braking system.** It hooks into\n\n`git commit`\n\nand runs an AI review on every diff In short, git-lrc helps **Prevent Outages, Breaches, and Technical Debt Before They Happen**\n\n**At a glance:** [10 risk categories](https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for) · [100+ failure patterns tracked](https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for) · every commit…", "url": "https://wpnews.pro/news/the-shell-you-know-vs-the-shell-you-deserve", "canonical_source": "https://dev.to/lovestaco/the-shell-you-know-vs-the-shell-you-deserve-38pf", "published_at": "2026-07-10 18:23:37+00:00", "updated_at": "2026-07-10 18:43:44.421471+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence"], "entities": ["Maneshwar", "git-lrc", "McFly", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/the-shell-you-know-vs-the-shell-you-deserve", "markdown": "https://wpnews.pro/news/the-shell-you-know-vs-the-shell-you-deserve.md", "text": "https://wpnews.pro/news/the-shell-you-know-vs-the-shell-you-deserve.txt", "jsonld": "https://wpnews.pro/news/the-shell-you-know-vs-the-shell-you-deserve.jsonld"}}