Nushell is great for simple tasks. i.e. ls **/data.json | each {|it| mv $it.name $"(dirname $it.name)/data.yml" } Will be much more complex in bash find -name "data.json" | xargs -i bash -c "mv \"{}\" \"\$(dirname '{}')/data.yml\"" Note the escaped quotes and dollar signs in bash. It is really difficult to get them right. In Nutshell we are actually using "functions" (supported syntax-wise) to do the job, so it will…
> find -name "data.json" | xargs -i bash -c "mv \"{}\" \"\$(dirname '{}')/data.yml\"" Albeit this task needn't involve a shell at all - just `find` and `rename`: find . -name data.json -exec rename .json .yml {} +
Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?
101–110 of 146 posts
Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?
#102Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?
#103Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?
#104Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?
#105Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?
#106Earlier quoted context omitted.
> find -name "data.json" | xargs -i bash -c "mv \"{}\" \"\$(dirname '{}')/data.yml\"" Albeit this task needn't involve a shell at all - just `find` and `rename`: find . -name data.json -exec rename .json .yml {} +
Do you really have rename on your computer? What OS is this?
It seems to be included with the util-linux package
https://packages.fedoraproject.org/pkgs/util-linux/util-linu...
Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?
#107Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?
#108Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?
#109I use `fish` as my main shell. It's closer to POSIX than eshell or oil, but it's definitely not POSIX. Personally, the main thing I like about it is that I can't copy paste bash commands. It forces me to read and understand and then convert. It also has some quality of life stuff I really like. I think next time I'm just going to go back to ZSH though as I feel I have learnt enough from the experience of using it tha…
Re: Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?
#110I'm a Linux native guy and I haven't hardly touched Windows in years but I still find myself curious about PowerShell. Is PowerShell even remotely suitable as a Linux shell? Is there any hope for PowerShell on Linux, it's an interesting take on shells.
Configured with PSReadline Emacs mode it really feels pretty much like bash for the most part, except better. https://github.com/lukeschlather/dotfiles/blob/master/src/Wi...
(Concrete better: copy-paste, selecting with the mouse, scrolling all just work. Copy-paste pastes multiline by default so you don't end up executing commands without a chance to review.)
I've been wanting to try out elvish which seems like it might be a cleaner and more "unixy" pwsh. https://elv.sh/