You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is usually desireable for mommy to be disabled by default, but sometimes you might like to enable it for a single session.
In these cases it might be nice to have a mommy [-i | --interactive] that starts a new shell with mommy enabled internally. The user should be able to exit that shell in the regular way, i.e., with exit.
The text was updated successfully, but these errors were encountered:
dsprenkels
changed the title
Add option to start an interactive mommy session
add option to start an interactive mommy session
Mar 1, 2023
when you say "enabled", do you mean "act as if every command is prefixed by mommy"? because the way I have integrated mommy in my shell is the way it's explained in the fish section, which is different than passing each command through mommy.
an alternative would be to add the option mommy --gated (weird name, need a better one) which checks MOMMY_INTERACTIVE: if it is set and non-zero, mommy behaves as it does currently, but if not set or zero, it runs the command normally but without outputting anything. this way, you can just follow the integration steps in the shell integration section, but also add the --gated option so that mommy isn't actually enabled until you set MOMMY_INTERACTIVE=1 in your shell. which is kind of like running mommy -i, I guess. (unfortunately it is impossible to make mommy -i or any other command set the environment variable.)
i would also like a mommy -i command as you proposed, but I'm not sure it's feasible because I don't know a generic way for shells to always pass every command through mommy. you could maybe create some sort of shell wrapper so that after mommy -i each command you give the interactive session is passed to the shell of your choice, but then you cannot use environment variables :/ last option would be to create our own shell, but i really think that's out of scope for mommy.
write mommy -t to toggle whether mommy is enabled in all shells by the current user, or
write export MOMMY_ENABLED=0 or export MOMMY_ENABLED=1 to disable/enable mommy only in the current shell?
the former is much shorter, easier to remember, and easier to write, but there's no way to restrict the behaviour only to the current shell, so the state will be stored in a file, and apply to all shells by the current user. (i can also add mommy -t 0 and mommy -t 1 to not toggle but explicitly disable/enable.)
the latter is harder to use and just generally less nice, but will apply only to the current shell (and sub-shells).
It is usually desireable for mommy to be disabled by default, but sometimes you might like to enable it for a single session.
In these cases it might be nice to have a
mommy [-i | --interactive]
that starts a new shell with mommy enabled internally. The user should be able to exit that shell in the regular way, i.e., withexit
.The text was updated successfully, but these errors were encountered: