mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-12-23 11:00:43 -06:00
Compare commits
3 commits
24d77a198c
...
0069a937b0
Author | SHA1 | Date | |
---|---|---|---|
0069a937b0 | |||
a3f7bc5437 | |||
2d13f52011 |
5 changed files with 21 additions and 6 deletions
|
@ -1,3 +1,6 @@
|
||||||
USAGE={a.bold}{a.cyan} viv isn't venv{a.end}\n\n\ttasks:\n
|
USAGE={a.bold}{a.cyan} viv isn't venv{a.end}\n\n\ttasks:\n
|
||||||
PHONIFY=1
|
PHONIFY=1
|
||||||
HELP_SEP={a.b_blue}>>>{a.end}
|
HELP_SEP={a.b_blue}>>>{a.end}
|
||||||
|
|
||||||
|
-include .task.mk
|
||||||
|
$(if $(filter help,$(MAKECMDGOALS)),$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v23.1.1/task.mk -o .task.mk))
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -31,5 +31,4 @@ generate-example-vivens: ##
|
||||||
for f in $(EXAMPLES); \
|
for f in $(EXAMPLES); \
|
||||||
do python examples/$$f; done
|
do python examples/$$f; done
|
||||||
|
|
||||||
-include .task.cfg.mk .task.mk
|
-include .task.cfg.mk
|
||||||
$(if $(filter help,$(MAKECMDGOALS)),$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v23.1.1/task.mk -o .task.mk))
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ homepage = "https://github.com/daylinmorgan/viv"
|
||||||
repository = "https://github.com/daylinmorgan/viv"
|
repository = "https://github.com/daylinmorgan/viv"
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
viv = "viv:main"
|
viv = "viv.viv:main"
|
||||||
|
|
||||||
[tool.pdm]
|
[tool.pdm]
|
||||||
version = { source = "scm" }
|
version = { source = "scm" }
|
||||||
|
|
4
src/viv/__main__.py
Normal file
4
src/viv/__main__.py
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
from .viv import main
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
|
@ -27,7 +27,7 @@ from dataclasses import dataclass
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from itertools import zip_longest
|
from itertools import zip_longest
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from textwrap import wrap
|
from textwrap import dedent, wrap
|
||||||
from typing import Dict, List, Tuple
|
from typing import Dict, List, Tuple
|
||||||
|
|
||||||
__version__ = "22.12a3"
|
__version__ = "22.12a3"
|
||||||
|
@ -733,7 +733,12 @@ class Viv:
|
||||||
return matches[0]
|
return matches[0]
|
||||||
|
|
||||||
def remove(self, args):
|
def remove(self, args):
|
||||||
"""remove a vivenv"""
|
"""\
|
||||||
|
remove a vivenv
|
||||||
|
|
||||||
|
To remove all viv venvs:
|
||||||
|
`viv rm $(viv l -q)`
|
||||||
|
"""
|
||||||
|
|
||||||
for name in args.vivenv:
|
for name in args.vivenv:
|
||||||
vivenv = self._match_vivenv(name)
|
vivenv = self._match_vivenv(name)
|
||||||
|
@ -813,7 +818,11 @@ class Viv:
|
||||||
aliases = kwargs.pop("aliases", [name[0]])
|
aliases = kwargs.pop("aliases", [name[0]])
|
||||||
cmd = getattr(self, name)
|
cmd = getattr(self, name)
|
||||||
parser = subparsers.add_parser(
|
parser = subparsers.add_parser(
|
||||||
name, help=cmd.__doc__, description=cmd.__doc__, aliases=aliases, **kwargs
|
name,
|
||||||
|
help=cmd.__doc__.splitlines()[0],
|
||||||
|
description=dedent(cmd.__doc__),
|
||||||
|
aliases=aliases,
|
||||||
|
**kwargs,
|
||||||
)
|
)
|
||||||
parser.set_defaults(func=cmd)
|
parser.set_defaults(func=cmd)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue