Git Product home page Git Product logo

Comments (4)

brunerd avatar brunerd commented on July 23, 2024

Hi @FranckSartori, I downloaded the latest CodeRunner (4.2.2.), pasted the minimized jpt function as-is and a very simple one liner echo '["wow"]' | jpt -T and it's able to run in CodeRunner just fine? Nothing is halting. Make sure you are using the latest jpt v1.0.8 perhaps? Otherwise maybe there's something else in your script causing this error, shell is notorious for one character causing issues way down the line. Have you simply made a script with just the jpt.min function inside? Kinda like my example here...

Screenshot 2023-10-05 at 12 29 26 PM Screenshot 2023-10-05 at 12 29 30 PM

from jpt.

FranckSartori avatar FranckSartori commented on July 23, 2024

Hi Joel.
Thanks for your message.
jpt is working perfectly in CodeRunner.
The issue is that if you add a function after jpt in the script, you will not be able to navigate between the functions via the browser on the lower right corner (screenshot).
I have scripts around 35,000 lines with dozens of functions and I never saw the issue before pasting jpt (minimized or not).
If you remove the locations part at the end of jpt, the browser is available again.
I fear that CodeRunner will just tell me that the issue is in the pasted script as I can’t reproduce the issue without jpt.
I can circumvent the issue by putting jpt after the last function, but ok, that is just hiding the dust.
I didn’t find what to change in the locations part so CodeRunner behaves normally.
Such issue happens normally only if there is a syntax error in the function.
Franck
Capture d’écran 2023-10-05 à 20 02 30

from jpt.

brunerd avatar brunerd commented on July 23, 2024

Ah... I see... yeah it appears CodeRunner just can't deal with case statements where the "list" of commands is right after the "pattern" ). I bet they'll be able to fix that. Here's a simplified example you can use:

#!/bin/bash

function top()(
	echo top
)

function middle()(
	while getopts ":a" option; do 
		case "${option}" in 
			#codeRunner is flummoxed by this
			#it wants a newline after *)
			*)options+="${option}";;
		esac
	done
)

function end()(
	echo end
)
no_newline newline

from jpt.

FranckSartori avatar FranckSartori commented on July 23, 2024

Thanks. I forwarded the thread to CodeRunner support. I hope they will like to improve the product to manage this situation !

from jpt.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.