We all look like hackers when using the terminal (specially if we have green over black theme) but the truth is we tend to be amazingly lazy, and start using poor techniques.
I'm very untidy on my life, and I'm used to save the git clones in brand new directories so for example, in order to enter in my cloned repo, I have to...
# cd random_named_dir
# cd cloned_repo_dir
or even worse:
#cd random_nam*
#cd *
When updating my git, (I'm sorry, probably my virtual infrastructures' teacher will read this) in hurry I might write:
git add .
I sometimes save stuff in $HOME but later I don't remember where did I put 'em, or complain and sigh when I have to write my password in sudo because a long time passed since the last time I wrote it.
What are your most dark lazy secrets on the terminal? Do you want to change that and start using the terminal properly even in hurry? :p
Top comments (44)
These don't sound lazy at all, but just properly following the path of least resistance.
Though it sounds like some of these (like the
cd
example) could be simplified with Tab-completion.I really hated copying and pasting or typing out individual filenames with git, so I started using github.com/holygeek/git-number which gives the ease of a git gui to the git cli.
My motto for shortcuts and aliases is that "I just hate typing" even though I really don't, but it forces me to think "how many times do I do this?" what if I cut the command in half?
I never get to write aliases for git * which I use every single day. I should do it now.
I hate using
rmdir
and I always writerm -rf
because it happens that I need to remove multiple files and directories at once and I'm to lazy to write multiple commands :(Thanks for sharing, I love this kind of content! :)
I like to use trash, It's a lot better tool. check it out! npmjs.com/package/trash-cli
Thanks, I'll give it a try ! :)
but don't forget to make alias, so you get
trash
when typingrm
That's a bad idea, scripts might use
rm
and it starts adding up to your trash. Also, if you keep the habit of usingrm
you might be less careful when using it on a machine that doesn't have trash installed.Solution: For now, make
rm
print something like "no, use trash", and get a habit of usingtrash
overrm
.Good observation!
In fact, I don't think I'll continue to use
trash
because it's relatively slow compared torm
. Finally, it's a part of my job to think before acting ¯_(ツ)_/¯.No no no that's not what I meant! Even if I barely ever need to restore from trash, it's really nice to not feel worried you're destroying your system. Also, shouldn't moving directories be faster than deleting each file?
I'm guessing NodeJS
fs
is not as fast as the linux filesystem ? ^You were using a NodeJS version of trash-cli? Try github.com/andreafrancia/trash-cli.
I tried the version mentioned earlier:
github.com/sindresorhus/trash-cli
I'll give a try to yours :)
Always choose the first result on Google ;)
I do the same!! Oh my..
Hm... I guess mine would be stuff like
git amend
aftergit push
, alsogit push --force
:DFor me, it's stopped jobs. It's rare that, in a window where I'm actively working, I don't have less than 6 stopped jobs (at least 2-3 ipython shells, lessing some file, maybe a man page or two). In some cases, I've had over 20.
I had the same tmux session on this one machine for at least two years, then recently it just died (of old age, I presume). I was devastated.
Aliases for lazy people :
Git aliases for super lazy people :
With a lazy alias to show other lazy aliases (la)
Sometimes I need to just type something into the clipboard (sometimes to avoid memorizing it!), so this one comes handy for me often
I constantly
git stash
and completely forget what I stashed, then just end up runninggit stash clear
anyway and rewrite whatever I was doing.Definitely have had times where I had more than 7 stashes saved though...
git stash
is bae <3 ;)
Some
.bash_aliases
that I forget to use all the time haha. Plus, I have a folder namedgithub
togit clone
all the things, and a folderrepos
for my projects that I leave halfway (that's sad now that I think about it:'(
).I made a script for committing to GitHub because I am too lazy to commit normally.
I only have a few aliases I use with any regularity and most of them are less laziness and more not wanting to remember byzantine argument and switch combinations for specific tasks: