-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support launching with a specific command #3
Comments
Sounds great. Would love a PR!
Seems like a good plan. Shells are definitely not my area expertise. It seems like |
I just had a thought that it might be interesting to boot directly into emacs and afaict, it works! One idea I've been kicking around using membrane.term as a way to provide a usable code-editor for membrane. It might require a little configuration to hide the frame, but it seems plausible. Embedding a code editor made me wonder if you could embed a number of other cli tools. |
Interesting! So maybe instead of adding a |
Yea, that makes sense. It could potentially be useful for the use case you mention of taking screenshots for cli tools. You can bypass the shell and skip to the good part. |
Neat! How do you feel about bringing in deps? I'm thinking of babashka.process's nice tokenization support. |
I'm pretty open to adding dependencies that solve problems. Obviously, if it's incredibly huge, it's worth thinking about, but that's very rare for clojure libs. |
So while I work on #5, I'm thinking ahead about the new cmd idea. We'll have (assume the
But what about What do you think of:
Watha think? With the cmd idea, is the play concept still interesting/valuable? |
I assume you're using babashka.process to tokenize "git log" into ["git" "log"]. Are there any common shells where the tokenization might differ? That's probably fine, but worth checking.
Play does sound better than "path". It's not entirely clear that
I think so. One of the original intended use cases was to be able to automate taking screenshots for terminal utilities. I'm not sure how to produce the following image without a The script was:
Additionally, You could theoretically also use it for testing how a command line program responds to ctrl+c, ctrl+z, and other input sequences. |
Thanks @phronmophobic!
Yeah, that's the thought.
The convenience might turn out to be inconvenient/problematic in some cases.
Hmmm, interesting point. And on keeping a play option: nice example, sounds good, thanks! |
For the cli, I think it's ok if to not support every use case if it makes 80-90% of use cases easier. If it's uncommon for a shell to not have similar tokeniztion, it's always possible to use the programmatic API as a workaround.
👍
It would also leave open the possibility for a "record" feature in the future. |
Cool, but my most important question is: what's the difference between phronmophobic (your username) and phronemophobic (seen in your project namespaces) and are these related to phronesis and does this mean you have a fear of practical wisdom? |
It's been my username since middleschool, but the original definition I read was that phronemophobia is the "fear of thinking". I definitely have a tendency to over think things :D. The reason my username is spelled wrong was because the first platform that I used had a 14 character username limit. I own phronemophobic.com which is why it's used in all of the project namespaces. 😄 |
Thanks! The fact that you've put a lot of thought into your username makes total sense! 🙂 |
@phronmophobic, gonna look at this one. Current thoughts:
Sound good to you too? |
Added option :command to API and --command command line. - screenshot :play/--play option is now optional - Adapted sample play scripts to run /bin/bash as part of setup. On my system I run zsh with powerlevel10k and my fancy prompts were getting into README screenshots. - On macOS and Linux :command defaults to $SHELL else /bin/bash - Included support to default :command to powershell if on Windows. This gets us past launch, but there are still be many issues on Windows. Contributes to phronmophobic#29 - See README and docstrings for details on usage Closes phronmophobic#3
Added option :command to API and --command command line. - screenshot :play/--play option is now optional - Adapted sample play scripts to run /bin/bash as part of setup. On my system I run zsh with powerlevel10k and my fancy prompts were getting into README screenshots. - On macOS and Linux :command defaults to $SHELL else /bin/bash - Included support to default :command to powershell if on Windows. This gets us past launch, but there are still be many issues on Windows. Contributes to phronmophobic#29 - See README and docstrings for details on usage Closes phronmophobic#3
Added option :command to API and --command command line. - screenshot :play/--play option is now optional - Adapted sample play scripts to run /bin/bash as part of setup. On my system I run zsh with powerlevel10k and my fancy prompts were getting into README screenshots. - On macOS and Linux :command defaults to $SHELL else /bin/bash - Included support to default :command to powershell if on Windows. This gets us past launch, but there are still be many issues on Windows. Contributes to phronmophobic#29 - See README and docstrings for details on usage Closes phronmophobic#3
Added option :command to API and --command command line. - screenshot :play/--play option is now optional - Adapted sample play scripts to run /bin/bash as part of setup. On my system I run zsh with powerlevel10k and my fancy prompts were getting into README screenshots. - On macOS and Linux :command defaults to $SHELL else /bin/bash - Included support to default :command to powershell if on Windows. This gets us past launch, but there are still be many issues on Windows. Contributes to phronmophobic#29 - See README and docstrings for details on usage Closes phronmophobic#3
Added option :command to API and --command command line. - screenshot :play/--play option is now optional - Adapted sample play scripts to run /bin/bash as part of setup. On my system I run zsh with powerlevel10k and my fancy prompts were getting into README screenshots. - On macOS and Linux :command defaults to $SHELL else /bin/bash - Included support to default :command to powershell if on Windows. This gets us past launch, but there are still be many issues on Windows. Contributes to phronmophobic#29 - See README and docstrings for details on usage Closes phronmophobic#3
Added option :command to API and --command command line. - screenshot :play/--play option is now optional - Adapted sample play scripts to run /bin/bash as part of setup. On my system I run zsh with powerlevel10k and my fancy prompts were getting into README screenshots. - On macOS and Linux :command defaults to $SHELL else /bin/bash - Included support to default :command to powershell if on Windows. This gets us past launch, but there are still be many issues on Windows. Contributes to phronmophobic#29 - See README and docstrings for details on usage Closes phronmophobic#3
Sounds like a good plan! |
Currently
membrane.term launches a
/bin/bash
shell.This results in the following warning text on macOS 10.15.7:
Seems that macOS would really rather we use zsh! 🙂
Ideas
I'm not sure the best approach here but offer up:
:shell
optionSHELL
environment variable (does that make sense?)/bin/bash
Next Steps
Happy to follow up with PR if this all makes sense.
The text was updated successfully, but these errors were encountered: