Skip to content
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

--fun-mode flag for, well, fun #48

Open
GijsTimmers opened this issue Oct 28, 2014 · 7 comments
Open

--fun-mode flag for, well, fun #48

GijsTimmers opened this issue Oct 28, 2014 · 7 comments

Comments

@GijsTimmers
Copy link
Collaborator

We should create a --fun-mode, for experimenting with cool stuff. For example:

  • Whenever a command executed correctly, show a sl with jo-shell on it in two goods wagons.
  • Whenever a command executed with an error code, spam the user with the error code, or something else
@jovanbulck
Copy link
Owner

👍
We should also detect automatically in the Makefile whether it is a mac and then if a user types exit don't exit, but display "[Process completed]" and don't exit, but go in an infinite loop ;-)

mac terminal

@GijsTimmers
Copy link
Collaborator Author

Also: replace cat by lolcat, if possible. See attached screenshot. Doing so would require lolcat as a dependency in packaging.
scrot

@GijsTimmers
Copy link
Collaborator Author

I have a better idea for exiting with an error status: bring back the system beep, or play this beep-compilation

@jovanbulck
Copy link
Owner

I have thought about this. I think it's probably a bad idea to hard include more and vague dependencies such as lolcat, sl, beep, etc. injsh`. This doesn't mean we can't build a funmode, rather we shouldn't hard-code it.

A promising idea, I think, is to include some kind of hooks onto several jsh-events. Let me explain: jsh would offer some way (e.g. ~/.jshrc) for a user to register a shell-command-string as a "hook" for a specific "jsh-event". This shell command string should then be interpreted from within the jsh source, every time the specified "jsh-event" happens. This way we would have a mechanism to allow a user to customize the shell's behavior.

A (non-exhaustive) list of possible "jsh-events" could for example be:

  • successful completion of a command
  • unsuccessful completion of a command
  • user entered "enter"
  • background job completed
  • login --> the hook here is basically the jshrc file
  • exit --> maybe we won't need a "hook" here, but rather a jshlogout file or so
  • maybe some other ideas here?

This wouldn't be too hard to implement, I think. Some built_ins for setting the hooks and then some interface header file for hooks probably and calling the hook_methods at the right time in the source code...

@GijsTimmers
Copy link
Collaborator Author

You're making a huge mistake.

@jovanbulck
Copy link
Owner

tell me more

@GijsTimmers
Copy link
Collaborator Author

fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants