4 ms·
I've been holding off making scripts for a lot of cases so that I memorize the commands. Do you think that's pointless? I'm a college student now and I've been
by iudqnolq 7y ago
I've been holding off making scripts for a lot of cases so that I memorize the commands. Do you think that's pointless? I'm a college student now and I've been thinking that I'd be better off not customizing my shell too much so that I can use other computers I end up in front of. (I have nothing against customization in general, as I think my emacs would show)
- lcall 7y agoGood question. I often (not always) start the custom command name (script or alias) with the same letter as what it abbreviates, and if memorizing were my goal and that didn't help enough to remember them, I might do as you suggest. But I have enough to remember as it is, so I make backups of my scripts (as with everything personal on my main computer) using tar/gz/gpg/rsync/scp, optical media, etc., so I can refer to them when memory fails. Overall, I'd have to guess it depends on the person and the priorities, and how well one way works for you vs. the other. I currently always use a computer under my control, and over time, enough has stuck in my memory. I also want to save my hands by making things ergonomic (shorter to type when practical), as the hands are useful in the long-term. :)
- lcall 7y agoI also make notes occasionally for review, to help me remember things (like with anki, or my sfw at http://onemodel.org http://onemodel.org ), or try to make mental connections with manual pages I have read so I know where to look something up again when needed. I also sometimes go to https://man.openbsd.org https://man.openbsd.org and put in just a period ("." w/o quotes) then click the "apropos" button (optionally choosing a section) to see "what is available" and jog my memory on good tools I have forgotten. Plus somethings get used so often they really do burn in to the memory: like, I am not going to forget "ls", but I don't want to type "ls -ltr [...]" very often and it is what I want, to see the most recent entry last, so I aliased that to just "l".
- kixiQu 7y agoThe most wizardly of the wizards I work with (FAANG, though that correlates less with shell wizardry than people might think) does a lot of his ~scripting in a Vim buffer in tmux and just enters text over one chunk at a time. This is a nice approach because a lot of the time he's starting from bare bones, and always has his basic building blocks very evident so he knows them well. But, when he needs to build up a more complicated script for review, he can clean up whatever he's got. If you ask me, I'd say don't worry too much about memorizing stuff you don't use often (viva la man page), but it's great to have your common commands memorized rather than aliased for when you're helping someone else out or explaining how something works.
- lcall 7y agoCould you clarify what is meant by "enters text over one chunk at a time" and "basic building blocks very evident"? I use tmux & vim but ... unsure if I follow. Edit: Do you mean, personal, local notes on tasks, as the notes evolve into scripts? I also keep a lot of personal notes which I can export into a web site (similarly to putting into a wiki, in a very loose comparison, an example being my site at http://lukecall.net http://lukecall.net or the other at http://onemodel.org http://onemodel.org), using something like a big, efficient, outline of all my notes. (I would probably put it in org-vim like org-mode, or maybe taskwarrior, if I didn't have http://onemodel.org http://onemodel.org, which I hope to make much easier to install, sometime.) Thanks.
- kixiQu 7y agoLess structured than that, I think, but approximately similar; just chunks of bash commands (cloud services CLIs need these a lot) and different grep pipe chains, etc, roughly clumped into bash functions