¹ https://distfiles.macports.org/Eterm/Eterm-bg-0.9.6.tar.gz
7,427 karma · joined February 3, 2014
[ my public key: https://keybase.io/jnrowe; my proof: https://keybase.io/jnrowe/sigs/orH3nyNqAK4vkIpcxn2HRihHPV2HX80SyDwM9cR5xnw ]
¹ https://distfiles.macports.org/Eterm/Eterm-bg-0.9.6.tar.gz
I'm yet to have any pushback on sending a thank you note, but who knows maybe it will upset some people in the future ;)
Which - I guess - also deserves a "add some contact details to profile" note.
I'd always kind of assumed that the target audience would have appreciated the IronPython use, as the .net ecosystem would likely have been more valuable to them. Having just looked I see that numpy wasn't available on IronPython until 2010, and I'm sure that would have been useful to have a little earlier.
¹ Pretty sure I've referenced it here a few times too.
It isn't even just the newer shells that have solved this, zsh also has a solution out of the box¹. The extensive globbing support in zsh can largely replace `find`, and things like zargs allow you to reuse your common knowledge throughout the shell.
For example, performing your first example with zargs would use regular option separators(`--`), regular expansion(`{1..5}`), and standard shell constructs for the commands to execute.
I'll contrive up an example based around your file counter, but slightly different to show some other functionality.
f() { fs=($1/*(.)); jo $1=$#fs }
zargs -P 32 -n1 -- **/*(/) -- f
That should recursively list directories, counting only the files within each, and output² jsonl that can be further mangled within the shell². You could just as easily populate an associative array for further work, or $whatever. Unlike bash, zsh has reasonable behaviour around quoting and whitespace too.Edit to add: I'm not suggesting zargs is a replacement for parallel, but if you're only using a small subset of its functionality then it may be able to replace that.
¹ https://zsh.sourceforge.io/Doc/Release/User-Contributions.ht...
However, my reasoning is the same as noted in echelon's reply. There are often far better ways to move around as described in ":h text-objects" and ":h motion.txt" more generally.
It feels great when you can use narrow-to-region² to perfect a complex address or write a custom function with all your editor's power at your fingertips. With the sad, but obvious, drawback that the changes aren't linked in your disjoint shell and editor history.
¹ https://manpages.debian.org/jessie/moreutils/vipe.1.en.html
² Nowadays, that is more likely https://github.com/chrisbra/NrrwRgn for me.
My own "trick" for improving my vim usage was to start mapping things to <Nop> that have better replacements, it is a great way to shock yourself out of bad habits like hjkl movements or reliance on /. Then again, I think text-objects and the items below it in motion.txt are the main to use vim so YMMV.
² https://pragprog.com/titles/dnvim2/practical-vim-second-edit...
2)
Yeah, I'd go the fish route if I had to do the work too ;) It is a huge step up from bash-completion, whilst still being easy to understand.
zsh's completion is unbelievably powerful, but also exceedingly complex once you move beyond basic file completion. Anything beyond even the most basic example tends to be littered with other zsh-isms too(said with the love of someone who submits such monstrosities to projects on a semi-regular basis).
[Edit: I just spotted a patch I submitted to bash-completion almost twenty years ago², I've been chasing this "perfect tooling" tail for a long time.]
3)
zsh allows fully customisable interactions by defining custom widgets within ZLE¹. Like many things with zsh they're super powerful once you work your way through the learning curve.
I have added a few `$if oil` blocks to my ~/.inputrc to workaround a few of the edit sequences I like to have available, but beyond the built-in readline functions and basic mappings readline feels quite limited to someone accustomed to zle. I'd just have to get used to some of the other functionality needing to be external tooling, and extracting things out of the shell would probably make a lot of sense anyway.
--
Also -- if you made it this far -- let me reiterate how much I appreciate the work you're doing. I've learnt heaps reading through both your posts in the blog and your comments here!
¹ https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#...
² https://github.com/oilshell/bash-completion/commit/24ab16438...
I do use `fd` in simple cases as it is sooooo fast, but it has quite limited functionality compared to zsh's extended glob syntax¹. I must add that `fd` is one-billion times more readable when you're flipping back through your history or extracting a short script with `fc`.
¹ https://zsh.sourceforge.io/Doc/Release/Expansion.html#Filena...
Off the top of my head, things I'm thinking of include:
* Just a minute ago realising that without zsh globs I have to remember find syntax, and then have to figure out how to sort the results(probably decorate →sort(1) → undecorate). My laziness led me to just C-d and execute my task with zsh.
* No context sensitive completion; I don't realise how much I rely on this until it is gone. Using bash-completion gets some completion, but it is a big step backwards.
* No programmable input, you can fake some with ~/.inputrc hacks but only basic text support(no macros). (Edit to add: The guard name is "oil" not "osh", if you're looking to do this yourself.)
There is a document in the wiki², but it doesn't really cover much. I'd be interested in seeing the configs of people who are using it.
--
Should say I really like the idea of hijacking '#!/bin/sh' to inject osh, it feels like a really good way to round out testing of scripts you'd otherwise forget about. I wonder if a LD_PRELOAD'able solution that would work outside osh would be a good idea.
¹ Strong déjà vu on this comment, but if it is real it is because I truly like the goals set out for oil.
¹ https://github.com/1j01/textual-paint
² https://news.ycombinator.com/item?id=36859880
¹ https://zsh.sourceforge.io/Doc/Release/Shell-Grammar.html#Pr...
¹ https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#The-...
However, it feels like a bad idea to me, if only because it reduces community building and curation a little. Without a mass of users taking action via flagging or reporting on community problems the end result will surely just tend towards submissions and comment threads that are simply garbage, as that is what new users would see as the social norms.
All that said, I wouldn't blame people for using it. There do seem to be a few members of this community that I'd not want to know in real life, and given their comments in some threads they'd not want to know me either ;)
Edit: I see you mentioned an extension in another thread, and this may be the same one. Still, I'll leave this here in case others want to see the links.
In the context of Debian, let us hope people aren't flashing a BSP³ in the hope of improved board support ;)
¹ https://wiki.debian.org/RISC-V#Hardware
It is mentioned in the Wikipedia link, but buried a little. I realise ISBN history is the epitome of super-nerdy, but the evolution path from $just_some_retailer through to the Bookland "country" is really quite interesting from an interoperability perspective.
As a light cricket fan², I take this position because I've spoken to the moany old folk who complain about The Hundred because "it isn't cricket". I think that is the advantage of The Hundred, and only to a much lesser extent T20.
I'm of the opinion you can't sell red ball to new markets because it is awful… unless you grew up with it. And, The Hundred is as far from red ball as cricket can get.
¹ https://en.wikipedia.org/wiki/The_Hundred_(cricket)
² Was checking for tickets just this week, but not fussed enough to write a sniper bot ;)
For instance, years later and it still isn't packaged in Debian. If nothing out of the tens of thousands of Debian packages has a dependency on it there presumably must be a good reason.
It strikes me as one of those libtermkey¹/libvterm things where Leonerd pushed it for years before anybody really used it, despite it being a seemingly obvious improvement over the status quo.
The main index² on that site is such a masterpiece, I'm unsure whether it is art or satire or satirical art. Regardless, pure genius for my overloaded from all the movement eyes.
I've always quite liked both topics as seemingly reasonable explanations for observed behaviour, there is something both quaint and fun about them from a modern eye.
I saw a talk at the RIGB a few years ago where the speaker took a funny walk through things that had been pushed there over the centuries, and how our understanding has changed since. It was hugely entertaining, and very informative on the process of progress. [secretly hoping someone finds a recording and posts a link]