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...
For further actions, you may consider blocking this person and/or reporting abuse
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
:DAliases 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
For 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.
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.
Wait, I'm not supposed to use
git add .
? Usually, I want all the changes I made in the directory to get committed.It's not a good idea. You could add generated files, backups, and conf files with stuff you don't want added. It's better to use (small) trump cards like *.png or simply add file by file. You don't need to use git add every time you commit, git commit -am "message" will add to the commit everything that has been modified.
You could, but I typically have a command line + visualization set up and in most cases, I go with
git add .
and go through the verification step visually beforehand.Well, I don't know. Your
.gitignore
really needs to be configured correctly, as a rule. I haven't added a wrong file in three years.I always use
git add -p
solved the problem for me tooWell, I don't know. You might have some secret information in a .json or in a .yml file. You might exclude it by name in .gitignore, but then you would have to remember to do so. Routinely doing individual (or pattern inside a directory) is a better practice where you don't have to remember to add every possible file with non-public information to .gitignore.
Well, first of all,
.gitignore
is smarter than that. You can exclude using patterns and directories, the same as you can do forgit add
.Second, in most cases, you shouldn't be putting secret information in the repository to begin with. Use a separate directory.
Third, think about the mind-memory load you're talking about here. Either you remember all the files with non-public information once and add it to a file (
.gitignore
), or you remember all the files period and discriminate which to add every single time (git add
). You're having to remember what not to add ANYWAY. If you can use a mental shortcut like "Well, I never change .yaml", then you should be adding*.yaml
to.gitignore
. Work smarter, not harder.In the end, it may depend on the project. I have never worked on a project where manually using
git add
instead of.gitignore
was worth the tremendous expenditure of effort. There may be exceptions.Ultimately, remember that Git offers both features because one size doesn't fit all.
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:
Back when I discovered the splendor of aliases, I went a little too far and used to have the following alias in my bash_aliases...
But then, using it, I realized that it was a little too much. (and auto completion with tab for git was unavailable this way, so too much laziness was killing laziness ! ;) )
I often use the arrows to find some complex command that I used a week ago. While doing so I usually realize that I would have already found it if I had used the search with Ctrl+R. And it only got worse since I switched from bash to zsh! :)
The old but gold
alias ll='ls -lah'
Using fasd cd, zsh-autosuggestions and zsh-autopair helped me a lot with complicated paths/commands. A bunch of aliases also helps me a lot, for example, open the last edited file.
Dealing with clipboard:
Some useful functions like:
Does a lazy git commit:
I use fish shell to autocomplete commands
To be very lazy, i have my own cheatsheet to display my most important commands AND also with an execution functionality. github.com/m1well/cheatsheet
I always do CTRL+r before I start typing anything in the command line to match my history of commands..
alias cd..='cd ..' saves me hours.
I have
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
I dont usually use the last one though
I plead guilty (-_-)
lazy != bad;
I keep a ~/wormholes directory for soft links to buried, frequently used directories, enabling
cd ~/wormholes/repo-1
I dont know if that its lazy habits but i code an automation tool for push code into github , with git add . 😂😂😂 . But its less work for me. Greets!!
Aliases.. Lots of 'em
I think git aliases from oh-my-zsh git plugin are made for and by lazy people <3
github.com/robbyrussell/oh-my-zsh/...