6 ms·
The secret weapon of Bash power users
- cranberryturkey 3y agocli is a lost art now
- gregjor 3y agoYou’re not wrong. Asking someone to send their public ssh key then login to a shell over ssh works as well as FizzBuzz to identify the newbs and posers.
- cranberryturkey 3y agoi got canned because i refused to install cpanel on our server for a fiverr dev the founder hired.
- johng 3y agoThat hurts.
- cranberryturkey 3y agoI tried to do the right thing. In the end that company was going to fail anyway
- gregjor 3y agoI have had “freelancers” ask for cPanel too. Sucks to get fired for that but you did the right thing.
- andrewflnr 3y agoIs cpanel that bad?
- mingus88 3y agoI mean, yeah, if you are a professional it’s a bad look to have to depend on a web GUI It’s like being a valet and not being able to operate a manual transmission
- cranberryturkey 3y agoexactly
- andrewflnr 3y agoWell yes, that's embarrassing for them, but I wouldn't consider it grounds for a hard refusal. Hiring cheap help is potentially decent business practice for low-stakes work. Refusal seems more appropriate if there was real damage from the software that raised it to an issue of professional ethics...
- cranberryturkey 3y agoIf they can't use the command line they suck. period.
- andrewflnr 3y agoI can't agree. Would you say the same for someone who was a pure designer? I doubt it. Would it suddenly become true if they picked up a little bit of admin-by-GUI on the side? Again, doubt it. But then how much technical skill can you have before the command-line-or-they-suck clause kicks in? It may have been true for the particular guy your previous boss hired, but it's unsupportable as a generalization.
- gregjor 3y agoGiving root permissions to a complex and opaque web GUI with a history of security problems seems bad. While it’s possible to correctly secure cPanel, the skills needed to do that are the same as those needed to manage the server without it.
- rnts08 3y agoI would have walked out as well.
- NikkiA 3y agoI've been using shells since 1989, and I still rarely remember ssh-copy-id exists, I guess that makes me a poser :(
- gjvc 3y agoI used to work with someone who was in the habit of setting root's shell to vi-mode. if you're reading this A____, fuck you.
- gregjor 3y agoCan also put set -o vi in your .bashrc or .profile
- account-5 3y agoTL;DR: vi keybindings are the secret weapon.
- chubot 3y agoYup, I swear by vi mode You can also use set -o vi in your bashrc to enable it. I've used it for probably ~18 years now. It also works with https://www.oilshell.org/ https://www.oilshell.org/ since we use GNU readline. Just 'set -o vi' in ~/.config/oils/oshrc
- jauntywundrkind 3y agoOne of the best things I did and forgot was piping either current line or selection into an existing terminal session. Vim compact <<< vim as command buffer.
- gumby 3y agoBTW emacs commands are the default in readline, thus in bash. They are ubiquitous in Mac text fields and buffers as well. Google docs too. Those commands are so deeply wired in my brain (from contionuous use since the 70s) that I dodn't even notice when a program supports them -- it's when a program doesn't that I notice.
- weikju 3y agoThere's an option in gnome keyboard settings or gnome tweaks to enable the same in GNOME apps.. Though it's a bit more limited but ctrl-a ctrl-e etc are working!
- opengears 3y agoAnd here is zsh-vi-mode https://github.com/jeffreytse/zsh-vi-mode https://github.com/jeffreytse/zsh-vi-mode
- necovek 3y agoWhen dealing with bash history, I find that too many people are still unaware of C-r (Ctrl+R or Command+R): press it and start typing unique bits of your past commands. If multiple commands match, cycle through them with repeated C-r presses. The usual reaction is :mindblown: :)
- NikkiA 3y agoThat would be the emacs style key mappings, specifically mirroring isearch-backwards. I have no idea what the vim mapping for that would be.
- avidiax 3y agoAnd even more don't know how great FZF (Fuzzy Finder) is. When properly setup, Ctrl-R now shows a fuzzy search of your command history.
- mingus88 3y agothis feature has pretty much eliminated the use of aliases for me. So efficient No longer do I need obscure abbreviated aliases for my common commands I just type ctrl-r and enough characters of the command I need until the one I need bubbles up
- CamJN 3y agoIt’s control+r on macOS too, one of the nicest things about macOS is that command and control are separate so they don’t interfere. So for example control+c in Terminal.app sends SIGINT, and command+c copies and there’s no ambiguity.
- necovek 3y agoThanks for the correction for Mac! But honestly, one of the *worst* things about Macs is that Command and Control are separate, and there are no good keys to remap them to (there is only one Caps Lock), so you have to contort your fingers for an oft used combination.
- 3y ago
- deleted 3y ago[deleted]
- 1vuio0pswjnm7 3y agoI am an ash user. ("Power user" is a term invented for users of TUI/GUI software.) I use ash as an interactive shell as well as a scripting shell. I prefer vi mode and libedit rather than readline. In ash, set -o vi is not necessary. set -V will do.
- marttt 3y agoOfftopic, but I know from your HN comments that you're also a NetBSD user, working in text mode. Would you mind describing your NetBSD setup a bit? What kind of kernel modifications have you done, and IIRC you also use RAM disk, etc? Thanks if you take the time. I find your comments here on HN very interesting.
- deleted 3y ago[deleted]
- 1vuio0pswjnm7 3y agoWhen I first started using NetBSD, audio did not work on the particular computer I was using. I made a simple edit to a kernel file and it worked. I no longer try to use NetBSD for audio; I'm interested in networking. I have learned to be patient about hardware support. As such, I am not making kernel modifications. I always use a memory disk inserted with mdsetimage. Only some small edits to kernel configuration files. https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/arch/evbarm/conf/ https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/arc... I always boot from USB stick where possible. On RPi I boot from SD card. I make custom userlands for the memory disk using crunchgen and makefs. Often I'll add a static tinysshd. In the beginning, many years ago, I learned how to "bootstrap" a "diskless" system comprising what I need day-to-day in a userland without having to compile anything. Never seen this approach in any published tutorial. Basically, I used an INSTALL kernel and substituted the /rescue crunched binary for the limited "install" one. I will either put a "complete" userland, i.e., with compiler, etc., e.g., as a cloop2 compressed image file on the USB stick, then mount it after boot, or I will chroot to an external drive containing a complete userland. Where possible I rely solely on the computer's RAM as writable "disk" space. There is never any data stored on the USB stick or SD card other than configuration files. The OS is read-only, immutable. The stick or card can be removed after boot.
- gxonatano 3y agoIt's not a secret, and it's a feature available to all modern shells, not just BASH.