Comments (4)
Is that better? (ad871b1)
[mission 1] $ cd ..
You left GameShell's directory structure. Use
$ cd
to go back to the GameShell's starting directory.
[mission 1] $
from gameshell.
You can go outside of GameShell, but I don't see a way around that. (Using chroot
would require root access, and "importing" /usr/bin
and all the rest.)
I decided to protect the base directory as it contains things I don't want the player to see: the GameShell source files and directories, temporary files, etc. That's to prevent the player from messing with those files by accident.
You can always go back to GameShell's root directory with cd
as the $HOME
variable is set accordingly.
("root directory" = $HOME
= starting dir of GameShell's "world"; "base directory" = parent of "root directory")
You can easily "unprotect" the base directory with gsh unprotect
, but it should probably be used only during development. (Note that when starting in debug mode, the base directory is not protected by default, and it is unprotected for one specific mission that may require accessing GameShell from an outside file manager.)
One thing that would mitigate the problem you describe is checking $PWD
in PROMPT_COMMAND
and print a message describing how to go back to the root directory.
What do you think?
from gameshell.
Thanks for the detailed response. 😄
I think there should definitely be some help to direct users back to the $HOME directory.
Printing a message as you've described would definitely help!
Perhaps something like:
"You've navigated outside of GameShell. Type cd
to return to the GameShell home directory."
from gameshell.
Thank you!
from gameshell.
Related Issues (20)
- Error with gsh reset at mission 41 HOT 1
- Mission 29 HOT 2
- mission 18 chromeos HOT 6
- gsh index and gsh goto do not appear with gsh help HOT 2
- Mission 18 : X11 connection rejected because of wrong authentication. HOT 3
- Update Italian translation of some GameShell files
- Please use asciinema instead of animated gifs HOT 1
- Installation in arch linux based distribution. HOT 1
- Dockerfile HOT 2
- /missions/stdin_stdout_stderr/04_stderr_dev-null_grimoires/ goal HOT 2
- Mission 18 Mac OS Issue: The variable DISPLAY is not defined. HOT 4
- Mission 28 and 29 (Mac OS): Some dependencies are not met HOT 1
- Mission 34 (Mac OS): Some dependencies are not met HOT 1
- Typo in italian translation on missions/stdin_stdout_stderr/02_stdin_redirection_multiplications/i18n/it.po HOT 2
- Missing some hint at the beginning? HOT 2
- Hosted GameShell in my blog HOT 1
- Accidentally created issue [remove] HOT 1
- Mission 34 - Translation error HOT 1
- Add a `gsh sofar` command HOT 2
- Don't let the player be stuck HOT 7
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 gameshell.