Comments (4)
@filipsch this is not ideal, but history expansion is not an issue for the NormalExercise. It will see !cat
(context here: https://github.com/datacamp/shellbackend#kernel-limitations)
from shellwhat.
Thanks @machow - why does the expansion show up in NormalExercise but not in ConsoleExercise ??
from shellwhat.
@gvwilson the NormalExercise is similar to writing bash code in a file. The backend receives the raw code in that file and decides how to run it / passes it to the SCTs. In a ConsoleExercise, the student is delivering STDIN to a terminal, which could be doing anything to that input. Seeing
> !cat
when a student types !cat
is just a side effect of how the shell is running at that moment in time (for example, if they had vim open and typed !cat
the result would be very different). There is no "student code". All we know is that they typed a stream of characters (including delete, etc..), and some ascii canvas thing has drawn a bunch of characters.
Through bash hooks and black magic, we can get back what code they are running when they run it, and give it to the SCTs. However, bash doesn't see !cat
. Very early on when bash is interpreting !cat
it expands it. This happens before bash even chops commands into separate "words".
(the issue referenced in the README I linked above points to the relevant bash docs)
from shellwhat.
I think this issue is not worth looking into. It's going to be used in 5 to 10 exercises at most in the coming year (currently only 1).
from shellwhat.
Related Issues (20)
- Support ast-based testing functionality HOT 1
- comparing what student has done to a target HOT 5
- Some nodes on AST need to be skipped HOT 1
- Set up travis + report code coverage HOT 1
- online tool for testing regular expressions HOT 1
- Implement Git SCTs HOT 6
- Support desktop execution of unit tests HOT 1
- Must be able to run one command for testing solution and show another to user HOT 1
- repl.run_command should NOT echo commands to the shell HOT 1
- Sub-exercise not reported in build error messages HOT 4
- Add the "success_msg" function HOT 1
- test_output_contains does not include errors HOT 4
- Move tests outside of shellwhat folder
- Research SCT problems with git and shell courses HOT 5
- Implement way to test use of ^C in shell courses HOT 1
- scts use text stripped of ANSI escapes by default HOT 1
- allow penalty-free execution of whitelisted shell commands HOT 4
- strip ANSI by default for SCTs HOT 1
- set up travis ci
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shellwhat.