Babashka REPL completions are merged. Test with:
bash <(curl ) --dev-build --dir . Nice! Cool that you show ns only when navigating to a specific completion. And multi-line editing is sweet too!
> Cool that you show ns only when navigating to a specific completion. Can you make screenshot of that? not sure what you mean here
Ya sure! Showing all completions (without ns):
Tabbing to a specific completion shows ns:
I'm assuming that was intentional. Less noise at first, useful noise when you need it?
funny, that's not how it works for me, but perhaps it depends on the terminal width?
Or color scheme?
it's probably the color scheme. it always shows the ns I think
Yeah, I switched my theme and see ns now:
I was using a theme called "Solarized (dark)" in xfce4-terminal. Maybe it had a booboo in its theme that made the ns disappear.
And here I thought you were being clever with a design choice! Always showing ns makes sense.
I'm not even sure if I have that level of control with jline's completion stuff
Oh, colors are preset in jline? I'm guessing a bug in my terminal's theme...
this is the preset of jline
I can change those though
One more cool thing that rebel-readline has is showing docs when typing (similar to CIDER). Would that be a welcome addition, or too much?
(and it also has something with cljfmt indenting and colored output, but I'm not sure about those yet)
cljfmt seems to be the most popular formatting tool, I could just bundle that with bb too, so people don't have to install separate cljfmt binaries :P
but it already works from source with bb, so probably no need
unless bb itself would use it
I haven't tried rebel-readline in ages, I see it has config for all these doodads: https://github.com/bhauman/rebel-readline?tab=readme-ov-file#configuration
ah yes, eldoc is what I meant
what I now have is pretty much the equivalent of what lein repl does
what lein repl also does is start an nREPL server
maybe I'll just keep it as is for now and then see how people will use it
Ya, that seems like a good approach. Oh, cool, rebel-readline has optional vi key bindings: https://github.com/bhauman/rebel-readline?tab=readme-ov-file#default-to-vi-bindings (but yeah, base features first).
I think focusing on a blog post / tutorial how people can write TUIs with bb is probably good to accompany the next release
(and to discover potential holes in the exposes JLine classes)
this lib fully works with bb dev now: https://github.com/TimoKramer/charm.clj
lread it is possible to get vi keybindings with the current iteration - you can do <C-x><C-v> from emacs mode and/or (this isn't the prettiest thing, but...) you can make a jlinerc file and tell bb's jline to use it with a system property:
cat .jlinerc
set editing-mode vi
./bb-dev -Dorg.jline.reader.props.input-rc-file-name=.jlinerc
That's sort of just a tiny bit of what can be tweaked, but Jline's docs are (IMO) a bit lacking in terms of configuring stuff outside of the app code.Thanks, @highpressurecarsalesm! It works!
I recently tried using babashka.cli . One thing I noticed is that positional arguments feel not-very-well supported. Is that part of its philosophy?
can you make an example? they are supported