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
Copy file name to clipboardExpand all lines: README.md
+9-6Lines changed: 9 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -25,18 +25,18 @@ paru -S mud-git
25
25
1. Run `mud config` to start interactive wizard which help you to set the preferable settings. Check [settings](#settings) section for more. At the end, `.mudsettings` file will appear at your home directory that you can alter in the future.
26
26
2. Locate to your preferable directory with repositories.
27
27
3. Run `mud init` command to create `.mudconfig` file. This file is important to keep references to repositories. All repositories in current dictionary would be included to `.mudconfig`.
28
-
4. Optional: Run [`mud --set-global`](#global-mudconfig) to make current configuration default and reachable from any directory.
28
+
4. Optional: Run [`mud set-global`](#commands) to make current configuration default and reachable from any directory.
29
29
30
30
All entries are stored in `.mudconfig` in TSV format. After making your first entry, you can open `.mudconfig` in a text editor and modify it according to your needs.
31
31
32
-
### Global .mudconfig
33
-
-`mud --set-global` - sets current `.mudconfig` as a global configuration, so it would be used as a fallback configuration to run from any directory.
34
-
35
32
## Using
36
33
37
34
### Commands
38
-
`mud <FILTER> <COMMAND>` will execute bash command across all repositories. To filter repositories check [arguments](#arguments) section.
39
35
36
+
-`mud set-global` - sets current `.mudconfig` as a global configuration, so it would be used as a fallback configuration to run from any directory.
37
+
-`mud get-config` - prints closest `.mudconfig` location.
38
+
39
+
`mud <FILTER> <COMMAND>` will execute bash command across all repositories. To filter repositories check [arguments](#arguments) section.
40
40
-`mud info`/`mud i` - displays branch divergence and working directory changes.
41
41
-`mud status`/`mud st` - displays working directory changes.
42
42
-`mud log`/`mud l` - displays latest commit message, it's time and it's author.
@@ -59,8 +59,11 @@ All entries are stored in `.mudconfig` in TSV format. After making your first en
59
59
Example:
60
60
61
61
```bash
62
-
mud -b=master -d git pull
63
62
# Filters out all repos with master branch and diverged branches and then runs pull command.
63
+
mud -b=master -d git pull
64
+
65
+
# Fetches all repositories that are not on master branch and have "personal" label but excluding ones with "work" label
Copy file name to clipboardExpand all lines: src/mud/app.py
+21-6Lines changed: 21 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -23,18 +23,19 @@ def __init__(self):
23
23
24
24
@staticmethod
25
25
def_create_parser() ->ArgumentParser:
26
-
parser=argparse.ArgumentParser(description=f'{BOLD}mud{RESET} allows you to run commands in multiple repositories.')
26
+
parser=argparse.ArgumentParser(description=f'mud allows you to run commands in multiple repositories.')
27
27
subparsers=parser.add_subparsers(dest='command')
28
28
29
29
subparsers.add_parser(LOG[0], aliases=LOG[1:], help='Displays log of latest commit messages for all repositories in a table view.')
30
30
subparsers.add_parser(INFO[0], aliases=INFO[1:], help='Displays branch divergence and working directory changes')
31
-
subparsers.add_parser(INIT[0], aliases=INIT[1:], help=f'Initializes the {BOLD}.mudconfig{RESET} and adds all repositories in this directory to {BOLD}.mudconfig{RESET}.')
31
+
subparsers.add_parser(INIT[0], aliases=INIT[1:], help=f'Initializes the .mudconfig and adds all repositories in this directory to .mudconfig.')
32
32
subparsers.add_parser(TAGS[0], aliases=TAGS[1:], help='Displays git tags in repositories.')
33
33
subparsers.add_parser(LABELS[0], aliases=LABELS[1:], help='Displays mud labels across repositories.')
34
34
subparsers.add_parser(STATUS[0], aliases=STATUS[1:], help='Displays working directory changes.')
35
35
subparsers.add_parser(BRANCHES[0], aliases=BRANCHES[1:], help='Displays all branches in repositories.')
36
36
subparsers.add_parser(REMOTE_BRANCHES[0], aliases=REMOTE_BRANCHES[1:], help='Displays all remote branches in repositories.')
37
37
subparsers.add_parser(CONFIGURE[0], aliases=CONFIGURE[1:], help='Runs the interactive configuration wizard.')
38
+
subparsers.add_parser(GET_CONFIG[0], aliases=GET_CONFIG[1:], help='Prints current .mudconfig path.')
38
39
39
40
add_parser=subparsers.add_parser(ADD[0], aliases=ADD[1:], help='Adds repository or labels an existing repository.')
40
41
add_parser.add_argument('label', help='The label to add (optional).', nargs='?', default='', type=str)
parser.add_argument(*DIVERGED_ATTR, action='store_true', help='Filters repositories with diverged branches.')
55
56
parser.add_argument(*ASYNC_ATTR, action='store_true', help='Switches asynchronous run feature.')
56
-
parser.add_argument(SET_GLOBAL[0], help=f'Sets {BOLD}.mudconfig{RESET} in the current repository as your fallback {BOLD}.mudconfig{RESET}.', action='store_true')
57
+
parser.add_argument(SET_GLOBAL[0], help=f'Sets .mudconfig in the current repository as your fallback .mudconfig.', action='store_true')
57
58
parser.add_argument('catch_all', help='Type any commands to execute among repositories.', nargs='*')
0 commit comments