Open chlohal opened 1 year ago
This would pair well with #129
That's an interesting idea! How do we handle it if the username given is different from the username of the current user?
What happens if I use different paths (or users) in different lines without explicitly changing the directory? Like this:
user1@DESKTOP:~$ echo 'hi'
user1@DESKTOP:~/documents$ echo 'hi'
user2@DESKTOP:~/documents$ echo 'hi'
One option would be to cd to the directory before every line. Or alternatively, only look at the first line for the directory and ignore any subsequent changes.
For username I would suggest ignoring this. It's not as if you could (or rather should) run it as a different user so presume that it is added markup for display purposes that can be ignored.
On GitHub and many other services, you can use a code-block with the
console
language to represent a console session. For example:It would be a great quality-of-life feature if we could
console
blocks$
)This may have security concerns, but IMO the ease-of-use provided is justifiable. Someone could easily
cd
in abash
block, but this is easier to write and scans better.