From fa53e407b7bd733bba9dfc07fecdc39eb329f9d4 Mon Sep 17 00:00:00 2001 From: Zachary Date: Fri, 30 Jul 2021 14:45:44 +0800 Subject: [PATCH] release v1.0.2 fix: color command bug. --- .vscode/settings.json | 1 + CHANGELOG.rst | 9 +++++++++ README.md | 9 +++++++-- pygittools/__init__.py | 5 +++-- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 1579d37..0d674f0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,6 +7,7 @@ "Zhang", "datefmt", "elisp", + "gitbook", "hexa", "msecs", "nargs", diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6921bd0..2324e4b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,15 @@ Changelog of pygittools ^^^^^^^^^^^^^^^^^^^^^^^^ +v1.0.2 (2021-07-30) +---------- +- Add debug mode. +- Update completion function. +- Support create \``.gitignore`\` template according to given type. +- Show runtime. +- Improve print, more color and beautiful. +- Fix color compatibility with python2. + v1.0.1 (2021-07-28) ---------- - Support quick view of GIT config diff --git a/README.md b/README.md index cfa3a07..7d21d92 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ You can use -h and --help to get help and more usage. You can run `g -h` or `g --help` to get the help message. ```bash -usage: g [-h] [-c] [-s] [-S TYPE] [-t] [-f] [-i] [-v] [--debug] [--out-log] [command] [args ...] +usage: g [-h] [-c] [-s] [-S TYPE] [-t] [-f] [-i] [-v] [--create-ignore TYPE] [--debug] [--out-log] [command] [args ...] If you want to use some original git commands, please use -- to indicate. @@ -60,11 +60,16 @@ optional arguments: -c, --complete Add shell prompt script and exit.(Supported `bash`, `zsh`) -s, --show-commands List all available short command and wealth and exit. -S TYPE, --show-command TYPE - According to given type list available short command and wealth and exit. + According to given type(Branch, Commit, Conflict, Fetch, Index, Log, Merge, Push, Remote, Stash, Tag, Working + tree, Setting) list available short command and wealth and exit. -t, --types List all command types and exit. -f, --config Display the config of current git repository and exit. -i, --information Show some information about the current git repository. -v, --version Show version and exit. + --create-ignore TYPE Create a demo .gitignore file. Need one argument, support: [android, c++, cpp, c, dart, elisp, gitbook, go, + java, kotlin, lua, maven, node, python, qt, r, ros, ruby, rust, sass, swift, unity] --debug Run in debug mode. --out-log Print log to console. + +runtime: 0.001976s ``` diff --git a/pygittools/__init__.py b/pygittools/__init__.py index ac2f569..20f7693 100644 --- a/pygittools/__init__.py +++ b/pygittools/__init__.py @@ -25,7 +25,7 @@ __project__ = "git-tools" __license__ = "MIT" -__version__ = "1.0.2-beta" +__version__ = "1.0.2" __author__ = "Zachary Zhang" __email__ = "zlj19971222@outlook.com" __git_url__ = "https://github.com/zlj-zz/pygittools.git" @@ -1129,9 +1129,10 @@ def color_command(command): color_command += temp + " " else: break + + color_command += Fx.reset if len(command_list) > 0: color_command += " ".join(command_list) - color_command += Fx.reset return color_command