A language that compiles to Bash and Windows Batch
121–130 of 148 posts
Re: A language that compiles to Bash and Windows Batch
#122Earlier quoted context omitted.
> Microsoft recognizes this MS also tried to improve PowerShell by installing the PSReadLine module by default. Read https://github.com/lzybkr/PSReadLine for instructions on how to make PS a bit more usable.
The problem with PowerShell is its syntax, not the extra features of the shell environment. Trying to expose the .Net runtime to the command line is an admirable goal for a scripting language, not a shell. It comes down to this, PowerShell is a catherderal, bash and tools are a bizarre, and that's why they win IMHO. Personally the best shell for any Windows box is to install cygwin and treat it like a Linux box, and…
You mean bazaar. Nice typo though.
Re: A language that compiles to Bash and Windows Batch
#123Earlier quoted context omitted.
It also doesn't come with any of the tools bash is a glue for, about the only reason one uses bash. At least with Python I can write my own grep and so on, and piping isn't so bad with coroutines and generators.
Windows has knock-off versions of several unix tools: grep = findstr cat = type which = where sort = sort more = more sudo = runas
I didn't know about where, being Windows "native". Thank you.
Re: A language that compiles to Bash and Windows Batch
#124Earlier quoted context omitted.
PowerShell took everything that was great about .NET and combined it with everything that was terrible about Bash. So we have, yet again, a difficult to understand language for shell scripting.
Why is it bad? I've been able to write some pretty great PS scripts to automate tasks. It's easier than firing up Visual Studio and writing a C# program I'd need to recompile if I ever want to change it.
Re: A language that compiles to Bash and Windows Batch
#125Earlier quoted context omitted.
I loved the idea. Some years ago, I was making a project that many parts of the build process depended on simple file copies (that this can do right) and ImageMagik calls (that are the same in all OSes) I ended having to keep writing the same scripts over and over again in Batch and Bash, it was quite a pain to maintain, and it was obvious that there had to be some way to do it automatically (port one to the other, o…
Why can't you use the windows versions of bash?
Re: A language that compiles to Bash and Windows Batch
#126Earlier quoted context omitted.
> sometimes you still need to glue things together with CMD why? is there something cmd can do that python can't? one example is enough...
I don't use windows much anymore so there might be a better way to do this, but I'll propose a use case: Automating the installation of python on a fresh machine.
It's a oneliner in powershell followed by choco install Python.
Re: A language that compiles to Bash and Windows Batch
#127Earlier quoted context omitted.
How are you going to install batsh though?
you don't need to install batsh. you maintain your code in batsh, compile to bat and have that up on your page as a download.
Re: A language that compiles to Bash and Windows Batch
#128Earlier quoted context omitted.
I don't use windows much anymore so there might be a better way to do this, but I'll propose a use case: Automating the installation of python on a fresh machine.
How are you going to install batsh though?
Re: A language that compiles to Bash and Windows Batch
#129Re: A language that compiles to Bash and Windows Batch
#130Paging @apenwarr