Earlier quoted context omitted.
Ditto. For projects where I must work in Windows my secret weapon is WSL + tmux + fish + vim for everything without a strict Visual Studio dependency.
hard to get around not using the mouse eventually when looking up docs or copy pasting from browser
The Beauty of Unix Pipelines
361–370 of 388 posts
Re: The Beauty of Unix Pipelines
#362Re: The Beauty of Unix Pipelines
#363Earlier quoted context omitted.
I agree that all of them so far seem to be lacking in many ways compared to PowerShell, but saying they are "nothing like" PowerShell isn't a very accurate statement in my opinion.
No, that is totally accurate - there is nothing even close to PowerShell. You were inaccurate on the other hand - what is similar to PowerShell ?
Re: The Beauty of Unix Pipelines
#364Text filtering approach narrowly rescued by website feature.
Phew, that was close!
Re: The Beauty of Unix Pipelines
#365Earlier quoted context omitted.
The shell works with spaces, you just need to be careful to quote every file name. The advantage of using file names without spaces is that you can avoid the quotes.
Please don't ever assume you can avoid spaces and quotes. It's just a time bomb. It's like people saying you don't need to escape SQL values because they come from constants. Yes, they do... today. It's not just quoting either. It's setting the separator value and reverting it correctly. It's making sure you're still correct when you're in a function in an undefined state. It's a lot of overhead in larger projects.
Re: The Beauty of Unix Pipelines
#366Earlier quoted context omitted.
Try finding out which registry key you need to edit to get something to happen. Some things across different systems have pitfalls as a result of their implementation, or some features have pitfalls. There are half a dozen things I can point to on windows that are worse than the "spaces in filenames". Hell, windows doesn't even support ISO 8601 dates, or times to be properly placed in files. It restricts symbols much…
who said anything about windows?
Re: The Beauty of Unix Pipelines
#367Earlier quoted context omitted.
who said anything about windows?
The parent thread referenced windows as something that handles spaces in filenames. I'm not sure why I'm getting downvoted when my comment was relevant to the debate occurring, and my point (that all features have downfalls caused by the necessity of implementation within the surrounding system, and in the case of command line arguments, linguistics and common keyboards themselves) is something that according to the…
Re: The Beauty of Unix Pipelines
#368Earlier quoted context omitted.
Ditto. For projects where I must work in Windows my secret weapon is WSL + tmux + fish + vim for everything without a strict Visual Studio dependency.
hard to get around not using the mouse eventually when looking up docs or copy pasting from browser
Copy-paste within tmux works just fine with (a) set -g mouse on in ~/.tmux.conf (b) mouse select to copy and (c) Ctrl + B ] to paste.
Copy-paste from tmux to Windows or vice versa is a pain.
I haven’t tried all the terminals yet but what I need is an iTerm2 [1] for Windows.
[1]: https://iterm2.com
Re: The Beauty of Unix Pipelines
#369Earlier quoted context omitted.
I have never come across a NodeJS script instead of a shell script. Can you suggest an example to look at that shows the advantages of this?
Here's a JS script [1] I wrote a little while ago just for my own use that queries the CDC for the latest virus numbers, then calcs the average, formats the data and prints to the command line. You can pass in a number of days, otherwise it pulls the last 14 days. $ node query-cdc.js 7 It's nothing special, but I wouldn't want to try to do this with command line utilities. (And yes, it was a bit uglier, but I cleaned…
Re: The Beauty of Unix Pipelines
#370Earlier quoted context omitted.
It replaces the executable in the current process with a different executable. It's kind of like spawning a new process with an executable, except it's the same PID, and file descriptors without CLOEXEC remain open in their original state.
whats a simple example of using this?
plenty of basic examples with execv, execve, execvp, etc.
if the execv() call succeed then it completely replaces the program running in the process that calls it
you can do plenty of tricks with that ;)