• Stars
    star
    390
  • Rank 110,242 (Top 3 %)
  • Language
    Shell
  • Created almost 2 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mommy is here for you on the command line ~ ❤️

sudofox/shell-mommy

Inspired by Gankra/cargo-mommy

This is a shell script that provides a mommy function which emulates a nurturing and supportive figure. The mommy function can be used to offer praise and encouraging responses to a user's actions, depending on the exit status of the command that is passed to it.

By default, the text will be output in a light pink to stderr. You can change this to a light blue if you find that more encouraging.

Example

I hope this will serve to improve the efficiency of your workflow and general mental health. Please use responsibly.

Installation

To use the mommy function, you can source the shell-mommy.sh script in your current shell or add it to your ~/.bashrc file to have it available every time you open a new terminal.

. /path/to/shell-mommy.sh

If you'd like it to always show a message after each command, you can define a custom PROMPT_COMMAND like so:

export PROMPT_COMMAND="mommy \\$\\(exit \$?\\); $PROMPT_COMMAND"

Configuration

The mommy function has several customizable options that can be set using environment variables:

  • SHELL_MOMMYS_LITTLE: Sets the affectionate term that mommy will use to refer to the user. The default value is "girl".
  • SHELL_MOMMYS_PRONOUNS: Sets the pronouns that mommy will use to refer to itself. The default value is "her".
  • SHELL_MOMMYS_ROLES: Sets the role that mommy will have. The default value is "mommy".
  • SHELL_MOMMYS_COLOR: Sets the color of the text output by mommy. The default value is a light pink color.
  • SHELL_MOMMYS_ONLY_NEGATIVE: If set to true, mommy will provide encouragement (on non-zero exit status) but not praise. This will keep clutter down if you intend to use mommy as a PROMPT_COMMAND.
  • SHELL_MOMMYS_NEGATIVE_RESPONSES/SHELL_MOMMYS_POSITIVE_RESPONSES: Sets the possible responses that mommy will use. This should be in the form of a bash array and will override the default responses. Want Samuel L. Jackson to chastise or compliment you? Now you can!

To add multiple possible values, separate them with a forward slash, for example:

export SHELL_MOMMYS_LITTLE="child/girl/boy"
# ...
$ mommy ls
README.md  shell-mommy.sh
awe, what a good boy~
mommy knew you could do it~ ❤️
$ mommy ls
README.md  shell-mommy.sh
good girl~
mommy's so proud of you~ ❤️
$ mommy ls
README.md  shell-mommy.sh
mommy thinks her little child earned a big hug~ ❤️

Usage

To use the mommy function, simply pass a command as an argument and mommy will provide a supportive response based on the exit status of the command. Depending on the exit status, mommy will provide a response of praise or encouragement.

mommy ls
# Output: Good girl! mommy's so proud of you! ❤️

mommy this-command-does-not-exist
# Output: Just a little further, sweetie~ ❤️

Example

# Set custom affectionate term and pronouns
export SHELL_MOMMYS_LITTLE="kiddo"
export SHELL_MOMMYS_PRONOUNS="them"

# Use the mommy function to run a command
mommy ls

# Output:
# That's a good kiddo~ ❤️

More Repositories

1

melee.sh

Make the Smash Bros Melee narrator announce whether your command is successful or not.
Shell
224
star
2

rtteg

gettr reversed
JavaScript
56
star
3

switch-browser

Documentation for the Nintendo Switch's inbuilt browser applet, and tools for remote testing and debugging.
47
star
4

xdolf

Xdolf was made closed source, so here's a backup!
Java
15
star
5

mojang-blocklist

identifying/tracking minecraft servers on mojang's blocklist
JavaScript
14
star
6

Sudo3DSCapture

Webapp that interfaces with 3DS Capture units to allow playback on any device
JavaScript
13
star
7

minecraft-utils

Various utilities I've produced while working on Minecraft-related things
Shell
12
star
8

fartpack

Minecraft Crystal PvP (or general purpose) resource pack that replaces explosions with farts
HTML
8
star
9

crowdstrike-recovery-iso

creates an iso image used to recover downed crowdstrike windows hosts
Shell
7
star
10

sudo-haiku-locales

Locales for sudo-haiku
JavaScript
6
star
11

gitscanner

Tools/utilities to clone every repository from a GitHub user or organization, and all the members of organization; and to scan over the entire commit history to find interesting things
Shell
6
star
12

blockdevdiff

This tool is meant to help with resuming an interrupted dd or block-level disk clone. It's extremely efficient for volumes of any size.
Shell
6
star
13

hatena-haiku-spam-filter

Filtering spam from Hatena Haiku with SpamAssassin
PHP
5
star
14

hatena-app-archive

Archive of mobile apps made by Hatena
Shell
4
star
15

blockdev-flipnote-recovery

PHP
4
star
16

mfgen

multi-frequency tone generator for telephony
C
3
star
17

hatena-ir-static

Hatena Investor Relations media archive
JavaScript
3
star
18

weight

Tracking weight with git; has a built in nag function that bugs you in your shell until you update it
Shell
3
star
19

useful-code-examples

C
1
star
20

cleanhelper

Some tools to help with disk space cleanups
Shell
1
star
21

minecraft-alt-manager

Command-line Minecraft alt manager.
PHP
1
star
22

ChocoHUD

Unified HUD across utility clients
Java
1
star
23

mackerel-plugin-spigot-jsonapi

Go
1
star
24

botw-research

I felt like digging into BotW's internals today so I might as well document what I find
1
star
25

xdolf-with-backports

Backporting Xdolf versions above 1.2.2 to allow an open experience. Some changes have been made to decouple the client from official Xdolf site (e.g. "remove IP grabber/backdoor")
Java
1
star