提交 afc90034 创建 作者: 305350171@qq.com's avatar 305350171@qq.com

提交作业

上级 608c4b35
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
{ {
"label": "查看Git中的用户配置用户信息", "label": "查看Git中的用户配置用户信息",
"type": "shell", "type": "shell",
"command": "git config --global user.name && git config --global user.email", "command": "",
"args": [], "args": [],
"group": "build", "group": "build",
"presentation": { "presentation": {
......
#!/bin/env python
# -*- coding: utf-8 -*-
import difflib
import sys
import argparse
import webbrowser
import os
import filecmp
import subprocess
import platform
if __name__ == "__main__":
count = os.popen('(git config --global user.name && git config --global user.email) | wc -l').readline()
if int(count) == 2:
print("已配置git的用户名和邮箱")
else:
print("请在终端中使用以下命令在配置git的用户名和邮箱")
print("git config --global user.name \"xxx\"")
print("git config --global user.email \"xxx\"")
\ No newline at end of file
a=$((git config --global user.name && git config --global user.email) | wc -l)
b=1
if [ $a -eq $b ]; then
echo "已配置git的用户名和邮箱"
else
echo "请在终端中使用以下命令在配置git的用户名和邮箱"
echo "git config --global user.name \"xxx\""
echo "git config --global user.email \"xxx\""
fi
\ No newline at end of file
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论