Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for expect (as a form of tcl) #6613

Open
cooljeanius opened this issue Nov 12, 2023 · 3 comments · May be fixed by #6614
Open

Add support for expect (as a form of tcl) #6613

cooljeanius opened this issue Nov 12, 2023 · 3 comments · May be fixed by #6614
Labels
Add Language Good First Issue This is a great opportunity to start contributing to Linguist

Comments

@cooljeanius
Copy link
Contributor

Language name

Expect

URL of example file

https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/lib/compat.exp

URL of syntax highlighting grammar

https://github.com/textmate/tcl.tmbundle

Most popular extensions

.exp

Detected language

None

Commentary

Expect is an extension to the Tcl scripting language, used by the dejagnu testing framework, which is in turn used to implement the testsuites for many important GNU toolchain projects, such as GCC and GDB. It can also easily be added to any project that uses automake by simply adding dejagnu to the AM_INIT_AUTOMAKE([]) invocation in configure.ac, and/or the AUTOMAKE_OPTIONS variable in Makefile.am. Note that I'm not sure if it should be treated as its own separate language, or if it would make more sense to just add .exp to the list of supported extensions for tcl, so I'm going to hold back from submitting a PR until we can develop some consensus as to how to answer that question.

Links

@cooljeanius cooljeanius added Add Language Good First Issue This is a great opportunity to start contributing to Linguist labels Nov 12, 2023
@Alhadis
Copy link
Collaborator

Alhadis commented Nov 12, 2023

or if it would make more sense to just add .exp to the list of supported extensions for Tcl

If expect(1) can execute arbitrary Tcl code, then yes, it makes more sense to treat .exp as Tcl instead of a whole new DSL. Similarly, expect would need to be added to the list of Tcl interpreters, so that correct syntax highlighting is displayed for scripts with #!/usr/bin/env expect -f hashbangs.

cooljeanius added a commit to cooljeanius/linguist that referenced this issue Nov 12, 2023
@cooljeanius cooljeanius linked a pull request Nov 12, 2023 that will close this issue
4 tasks
@cooljeanius
Copy link
Contributor Author

or if it would make more sense to just add .exp to the list of supported extensions for Tcl

If expect(1) can execute arbitrary Tcl code, then yes, it makes more sense to treat .exp as Tcl instead of a whole new DSL. Similarly, expect would need to be added to the list of Tcl interpreters, so that correct syntax highlighting is displayed for scripts with #!/usr/bin/env expect -f hashbangs.

OK, I did this in PR #6614

@cooljeanius cooljeanius changed the title Add support for expect (as tcl?) Add support for expect (as a form of tcl) Nov 20, 2023
@cooljeanius
Copy link
Contributor Author

I wonder if @donlibes is the same one who invented Expect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add Language Good First Issue This is a great opportunity to start contributing to Linguist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants