AshlinHarris / Spinners.jl

Command line spinners in Julia with Unicode support
MIT License
13 stars 1 forks source link

String variables are not supported #14

Closed AshlinHarris closed 1 year ago

AshlinHarris commented 1 year ago

@spinner "abc" sleep(4) is accepted, but s="abc"; @spinner s sleep(4) gives a MethodError.

AshlinHarris commented 1 year ago

Thanks for taking a look at this, @curio-sitas! I've pushed some major changes to the back end, but this issue is still present. Rather than shelling out, I'm using 1.9's interactive threadpools. I also removed the multiple nested macro definitions.

This issue is related to how the macro is defined. I could have used a function, but I wanted something users could add to single existing line of code that takes care of scope and cleanup.

I had been allowing multiple input types, possibly blank, but I'm starting to think that simplicity is best. So, if you can find a single way to define input that avoids the issue, we'll just force input to be that way.

curio-sitas commented 1 year ago

Hey ! I'll be looking at you changes. Yes i think that simplicity is the best, create an unique function and one input type as most as possible (i think symbols are great for that) and maybe a few macros for the different use cases