Live data from Hacker News

Command line tools for productive programmers

earthly.dev

41–50 of 143 posts

Re: Command line tools for productive programmers

#41
post #39
post #20

Earlier quoted context omitted.

Does it contain emacs? That would be nice.

What's wrong with dired mode? Ok, you'll get each directory in its own buffer. But, thinking of that, it shouldn't be to hard to make dired mode recurse into subdirectories inside the same buffer. (And fold/unfold like orgmode does. ;-)

dired-subtree does this, albeit on demand, not eagerly descending into subdirectories. dired-hacks more generally has lots of good stuff like filtering etc.

Re: Command line tools for productive programmers

#42
The funky tool sounds like a potential security issue, especially if you clone repos and then enter them without checking the contents first. I suppose it could be made safer by requiring review when adding a new directory or the settings for a directory changing.

Re: Command line tools for productive programmers

#44
I prefer the "git wip" custom command than gitupdate

  git config --global alias.wip "\!git add --all; git commit -a -m \"wip: update\""
  git config --global alias.wtc "\!git add --all; git commit -a -m \"[WTC] \$(curl -s whatthecommit.com/index.txt)\""
I don't like the idea to generate the list of modified files in commit messages, it's not very readable to me plus that I could just generate such info with git log. I tried to write a custom git-wip script to include output of "git status --porcelain=v1" but turns out it's just not necessary since "git log --name-status" could already show it

  git log --name-status
  # or get modified history of a specified file
  git log -p path/to/file.ext

Re: Command line tools for productive programmers

#45
post #9

> if the directory has many files or sub-directories, tree becomes much less helpful: you only see the last screen full of information as files scroll past you. > broot solves this problem by being aware of the size of your terminal window and adapting its output to fit it. What? You can just pipe `tree` into `less`. The solution isn't to download Yet Another Binary that does this specific thing and doesn't come inst…

What's wrong with solving problems the unix guys already solved decades ago, and doing so less elegantly?

Exactly, this is the opposite of the unix way of doing things. Do only one thing and well, be nimble.

Re: Command line tools for productive programmers

#46
This is productivity porn for programmers. While obviously these tools are deep and powerful, there is also a learning curve and experimenting wether you can adapt your workflow to them or vice versa. Next year we will have another 5 shiny command line tools, and so on.

My point being: only replace your weapons of choice once you are confident you are using them to their full potential and you identify needs that these known tools wont solve.

Re: Command line tools for productive programmers

#47
post #5

I think productive programmers would get way further by learning powerful scripting and one liners than picking different pre existing binaries. Its a little oldschool but pipe is the most powerful concept on the command line and it’s wildly productive

Though I agree that new is not necessarily better, and programmers should absolutely try to stratch their own itch with the existing tools (bash, sed, awk and the likes), some new tools are a great improvement and should be granted as such when due. FZF, for instance, is a major novelty in terms of interface, and it really follows the UNIX philosophy and shows immense composability.

FZF has indeed been a life changer for me: I loved ctrl+r, but fzf enhances it so much, and without much extra/non-desired functions.

Re: Command line tools for productive programmers

#48
post #8

For his usecase of funky i use ~/.bash_aliases, that way i can easily share them between machines. Eg to quickly add a new one: alias als="nvim $HOME/.bash_aliases && source $HOME/.bash_aliases" Be careful with quoting though, got myself into a situation where every new terminal asked for the root password. Shellcheck found the reason quickly. (edit) Another benefit is that those aliases abstract over differences of…

Instead of creating aliases for .., I use this: function ..() { for i in $(seq 1 $1); do cd ..; done } which enables .. # up 1 dir .. 2 # up 2 dirs .. 42 # up 42 dirs Here are some more: https://pilabor.com/blog/2021/03/unix-shell-tricks/

That's amazing.

Re: Command line tools for productive programmers

#49
post #45

Earlier quoted context omitted.

What's wrong with solving problems the unix guys already solved decades ago, and doing so less elegantly?

Exactly, this is the opposite of the unix way of doing things. Do only one thing and well, be nimble.

> this is the opposite of the unix way of doing things

Which makes sense, this is an article for people on Apple hardware (judging by the installation instructions), so no interest in keeping things "the unix way of doing things"

Re: Command line tools for productive programmers

#50
post #19

Brains recently got underrated. The way mcfly works is cool, but it offloads your habits to some “neural network” that you can’t control. There is not many methods slower than looking at unpredictable line-by-line output and almost nothing more anxious than a possibility of false choice done without thinking. This tool basically replaces a deterministic mismatch with a non-deterministic one. Your brain is good at pre…

fzf has a script you can source in your shell that binds to the usual keys and provides much more ergonomic history search
Post reply on HN