Skip to content

Conversation

sstevens2
Copy link
Contributor

fixes #1492

I added language that for some linux systems clear might also clear the scrollbuffer.

I'd also recommend making this callout a spoiler instead since it is optional content instead of content that should be highlighted. I can switch this back if maintainers disagree.

Copy link

github-actions bot commented Jun 18, 2025

Thank you!

Thank you for your pull request 😃

🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

  • 🎯 correct output
  • 🖼️ correct figures
  • ❓ new warnings
  • ‼️ new errors

Rendered Changes

🔍 Inspect the changes: https://github.com/swcarpentry/shell-novice/compare/md-outputs..md-outputs-PR-1493

The following changes were observed in the rendered markdown documents:

 02-filedir.md | 6 +++++-
 md5sum.txt    | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
What does this mean?

If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible.

This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

⏱️ Updated at 2025-08-21 13:53:50 +0000

github-actions bot pushed a commit that referenced this pull request Jun 18, 2025
@bkmgit
Copy link
Contributor

bkmgit commented Jun 18, 2025

Investigating this. Please try to wrap text at 80 characters to help readability of source files.

@sstevens2
Copy link
Contributor Author

I'll wrap to 80 char as requested. Going forward we might want to consider semantic line breaks instead as they are more readable and accessible.

github-actions bot pushed a commit that referenced this pull request Jun 18, 2025
@bkmgit
Copy link
Contributor

bkmgit commented Aug 18, 2025

clear -x should preserve scroll back buffer https://www.man7.org/linux/man-pages/man1/clear.1.html

## Clearing your terminal

If your screen gets too cluttered, you can clear your terminal using the
`clear` command. You can still access previous commands using <kbd>↑</kbd>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`clear` command. You can still access previous commands using <kbd>↑</kbd>
`clear -x` command. You can still access previous commands using <kbd>↑</kbd>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the -x flag is needed here. The addition for some bash configurations is mentioned below and the unexplained flag so early in the lessons where they are learning about options may be more cognitive load and more confusing than beneficial.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is better to move this after introducing manual pages? Would hesitate to remove that one can access previous commands - if one uses clear and is no longer able to access previous commands this will cause confusion that likely raised the associated issue. As Bash and other shells are configurable, introducing that one may need to manage/check configurations and look up options in the documentation is helpful. There is a cognitive load, but pretending these situations will not occur is a disservice - instead we want to encourage a growth mindset that one can configure a shell to be more efficient for what they do. The line above introduces ls -F, so showcasing options a little later may be helpful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Happy for it to be included there with the -x flag. Thanks for the point out that they learned using flags ahead of this statement!
In my experience, the clear here is included so that instructors who use it by habit can mention it to learners rather than because learners really need it at this point. I'm happy to leave it here with the flag as is currently written.

are **files** in the current working directory.

::::::::::::::::::::::::::::::::::::::::: callout
::::::::::::::::::::::::::::::::::::::::: spoiler
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benson and I are wondering about why this section was made into a spoiler? Is it because this is too much information? Thank you for looking through this!

Copy link
Contributor Author

@sstevens2 sstevens2 Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my understanding, a callout is something that that all instructors should cover because it highlights an important point. A spoiler is optional material and in my experience clear is something the learners don't have to learn at this point and so it is better left to the discretion of the instructor and thus placed in a spoiler. I don't even use clear regularly in my practice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should note, many of the older lessons have callouts might be better as spoilers throughout them since the spoiler capability is a relatively recent addition to the workbench. Before that feature, callouts were used somewhat inconsistently for optional content and important content.
I've been on the look out for them in my issues/PRs and noticed this one when I went to add the info about clear sometimes clearing the scrollback buffer.

Co-authored-by: Pariksheet Nanda <[email protected]>
github-actions bot pushed a commit that referenced this pull request Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Differences between terminals for "clear"

3 participants