Earlier quoted context omitted.
I have no dog in this fight (I use both Linux and macOS as daily drivers) but it could be argued that macOS has more of a claim to be Unix than Linux since the foundation of macOS comes from NeXTSTEP and FreeBSD whose codebases both ultimately descend from the original Bell Labs Unix, whereas Linux started life completely independently. I'd argue that Linux is more Unixy than macOS in terms of philosophy though, I re…
OSx is also Unix certified by the open group, along with hp-ux and aix. https://www.opengroup.org/openbrand/register/
Command line tools for productive programmers
81–90 of 143 posts
Re: Command line tools for productive programmers
#82I would suggest https://rubygems.org/gems/ruby-each-line-2 e.g. ps -A | grep ruby | grep fsevent | ruby-each-line "puts l.split.first" | xargs kill -9 cat c | ruby-each-line "puts l.split.first[0..-2]" >> .env.development pbpaste | ruby-each-line "puts l.split.last" | ruby-all-lines "puts lines.map(&:strip).join(',')"
I don't want to be That Guy who says his way is best but I can only really see this being useful for someone who knows no shell tools at all. > ps -A | grep ruby | grep fsevent | ruby-each-line "puts l.split.first" | xargs kill -9 killall -9 -r ruby.\*fsevent > cat c | ruby-each-line "puts l.split.first[0..-2]" >> .env.development awk '{ print(substr($1, 0, length($1) - 1)) }' c >> .env.development or awk '{ print $1…
After all, there's just one person using your shell: you. So whatever works well for you is a "good" solution.
Re: Command line tools for productive programmers
#83I can't sing the praises enough of entr. Just check out its man page: http://eradman.com/entrproject/ entr lets you watch files and re-run a command any time they change. Whenever I'm working on a script, or go tests, or whatever test-like thing I'm doing that's not in its own bloated test harness, I reach for entr. Great software, does what it's supposed to every time.
Re: Command line tools for productive programmers
#84I can't sing the praises enough of entr. Just check out its man page: http://eradman.com/entrproject/ entr lets you watch files and re-run a command any time they change. Whenever I'm working on a script, or go tests, or whatever test-like thing I'm doing that's not in its own bloated test harness, I reach for entr. Great software, does what it's supposed to every time.
I used to use entr extensively for Sketch plugin development (the vector editing tool by Bohemian Coding). However the app used to crash randomly and I felt my plugin was causing it. I spent an inordinate amount of time trying to debug it, replacing libraries, changing code and so on. Thankfully I noticed at some point that the app was behaving well for long durations of time when I started it without entr. I got rid…
Re: Command line tools for productive programmers
#85 export FZF_ALT_C_COMMAND='fd --type directory'
That's in my .zshenv.It's incredibly useful if you have multi-layered project directories. Like ~/Projects/Terraform/Cool_Project - you'd hit esc-c, type cool, hit enter and you're in the place you wanted to be.
Re: Command line tools for productive programmers
#86Author here. Thanks for sharing! Have you seen gron[1]? It can't do everything that jq can, but it is much more in the unix philosophy than jq. It simply flattens and unflattens json out into lines so you can use standard unix tools on it. ▶ gron "https://api.github.com/repos/tomnomnom/gron/commits?per_page=1" | fgrep "commit.author" json[0].commit.author = {}; json[0].commit.author.date = "2016-07-02T10:51:21Z"; jso…
Re: Command line tools for productive programmers
#87Fzf is one of those tools that instantly makes you shell feel magical to use. I highly recommend it, and I consider it by far the most useful in this list!
I use "ESC-c" a lot. It calls fzf and fd, you type a part of your directory name, hit enter, and it cd's to that directory.
export FZF_ALT_C_COMMAND='fd --type directory'
That's in my .zshenv.It's incredibly useful if you have multi-layered project directories. Like ~/Projects/Terraform/Cool_Project - you'd hit esc-c, type cool, hit enter and you're in the place you wanted to be.
Re: Command line tools for productive programmers
#88Author here. Thanks for sharing! Have you seen gron[1]? It can't do everything that jq can, but it is much more in the unix philosophy than jq. It simply flattens and unflattens json out into lines so you can use standard unix tools on it. ▶ gron "https://api.github.com/repos/tomnomnom/gron/commits?per_page=1" | fgrep "commit.author" json[0].commit.author = {}; json[0].commit.author.date = "2016-07-02T10:51:21Z"; jso…
I am sorry for spamming this comment, but I wanted to share it with all the fzf users because I found it so game-changing:
I use "ESC-c" a lot. It calls fzf and fd, you type a part of your directory name, hit enter, and it cd's to that directory.
export FZF_ALT_C_COMMAND='fd --type directory'
That's in my .zshenv.It's incredibly useful if you have multi-layered project directories. Like ~/Projects/Terraform/Cool_Project - you'd hit esc-c, type cool, hit enter and you're in the place you wanted to be.
Re: Command line tools for productive programmers
#89Author here. Thanks for sharing! Have you seen gron[1]? It can't do everything that jq can, but it is much more in the unix philosophy than jq. It simply flattens and unflattens json out into lines so you can use standard unix tools on it. ▶ gron "https://api.github.com/repos/tomnomnom/gron/commits?per_page=1" | fgrep "commit.author" json[0].commit.author = {}; json[0].commit.author.date = "2016-07-02T10:51:21Z"; jso…
also, have you seen this fzf "trick"? I am sorry for spamming this comment, but I wanted to share it with all the fzf users because I found it so game-changing: I use "ESC-c" a lot. It calls fzf and fd, you type a part of your directory name, hit enter, and it cd's to that directory. export FZF_ALT_C_COMMAND='fd --type directory' That's in my .zshenv. It's incredibly useful if you have multi-layered project directori…
Re: Command line tools for productive programmers
#90Earlier quoted context omitted.
also, have you seen this fzf "trick"? I am sorry for spamming this comment, but I wanted to share it with all the fzf users because I found it so game-changing: I use "ESC-c" a lot. It calls fzf and fd, you type a part of your directory name, hit enter, and it cd's to that directory. export FZF_ALT_C_COMMAND='fd --type directory' That's in my .zshenv. It's incredibly useful if you have multi-layered project directori…
Very cool! I use zoxide as a alias for cd to do this. But it only really works if you have cded using the full path in the past. But usually I have.