
For further actions, you may consider blocking this person and/or reporting abuse
For further actions, you may consider blocking this person and/or reporting abuse
Node.js doesnβt stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.
What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.
Arafat -
Ridhi Singla -
Rob OLeary -
tharos70 -
Once suspended, rsteube will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, rsteube will be able to comment and publish posts again.
Once unpublished, all posts by rsteube will become hidden and only accessible to themselves.
If rsteube is not suspended, they can still re-publish their posts from their dashboard.
Once unpublished, this post will become invisible to the public and only accessible to rsteube.
They can still re-publish the post if they are not suspended.
Thanks for keeping DEV Community π©βπ»π¨βπ» safe. Here is what you can do to flag rsteube:
Unflagging rsteube will restore default visibility to their posts.
Top comments (11)
@anderssonpeter feel free to export the subcommands/flags from the completers for that if it's any help
btw. powershell should work quite alright:

Hi you have al lot of completers there, i have almost no knowledge of
go
but is there any way the definition of them could be converted/exported to json, xml, yml or some other easily read file format?If then i could convert them to my own definition format.
Mine can easily be converted to other formats (excluding dynamic lists like for example git checkout lists the braches in the current directory).
So if i ever implement a completer that you lack feel free to convert it and add it to your tool! (if you need help doing the conversion to json, xml or yml dont hesitate to ask), currently i only have git and its not done yet, has alot of commands and parameters..
Yes, thats what i mean. It's a bit of work but you could add a
Run
function to the root command and traverse over the subcommands and flags like this:Either do some basic printing or create a custom struct and marshal it as json.
It's actually pretty simple so I added an export:
I started writing a export function but my lacking knowledge of go stopped me..
So thanks I will try out your export function instead :)
But just because I'm curious what did I do wrong here?
my
rootElement
is correct it has all the command elements as expected, but mycommandElements
have lost all their flags? they are there while insidec.LocalFlags().VisitAll(
but when I get tobytes, err := json.Marshal(rootElement)
they are gone?Not too sure with only a quick view on it, but my first guess would be that it's probably the difference of a
*Element
reference to aElement
copy.Meaning you are altering
command.Element
but rootElement.Elements might contain a different object.Try putting
rootElement.Elements = append(rootElement.Elements, commandElement)
after theVisitAll
.Thanks for your help I managed to get a export running after finding the
carapace-bin
repo!!Ah yes, might get a bit lost in the text. For everyone else: github.com/rsteube/carapace-bin
After thinking about my go issue i think you are right, when i added the command element to the root command, it took a copy of my variable and stored it.
So all the changes i did after got lost. Not that it matters your solution was much better than mine :).
I am trying to solve the same issue but for powershell with github.com/AnderssonPeter/PowerType
Nice post, your knowledge could enhance user experience of
z-shell.pages.dev :)