-
Notifications
You must be signed in to change notification settings - Fork 8
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
Implement way to check use of history commands in shell courses #40
Comments
@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) |
Thanks @machow - why does the expansion show up in NormalExercise but not in ConsoleExercise ?? |
@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
when a student types 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 (the issue referenced in the README I linked above points to the relevant bash docs) |
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). |
@gvwilson commented on Thu May 17 2018
From datacamp-content/courses-introduction-to-shell#129: if the user types
!cat
to repeat the lastcat
command, the user input we see in the SCT iscat filename
(or whatever they last typed), not!cat
, because history expansion is done before we get the text to check.The text was updated successfully, but these errors were encountered: