update version to v0.1.2

This commit is contained in:
tickstep 2022-01-24 22:17:33 +08:00
parent d36a764525
commit 7f53b9642c
5 changed files with 18 additions and 18 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<assemblyIdentity version="0.1.1.0" processorArchitecture="*" name="com.tickstep.aliyunpan" type="win32"/>
<assemblyIdentity version="0.1.2.0" processorArchitecture="*" name="com.tickstep.aliyunpan" type="win32"/>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>

26
main.go
View File

@ -50,7 +50,7 @@ const (
var (
// Version 版本号
Version = "v0.1.1"
Version = "v0.1.2"
historyFilePath = filepath.Join(config.GetConfigDir(), "aliyunpan_command_history.txt")
@ -200,8 +200,8 @@ func main() {
}
var (
activeUser = config.Config.ActiveUser()
runeFunc = unicode.IsSpace
activeUser = config.Config.ActiveUser()
runeFunc = unicode.IsSpace
cmdRuneFunc = func(r rune) bool {
switch r {
case '\'', '"':
@ -462,10 +462,10 @@ func main() {
// 显示命令历史
{
Name: "history",
Aliases: []string{},
Usage: "显示命令历史",
UsageText: app.Name + " history",
Name: "history",
Aliases: []string{},
Usage: "显示命令历史",
UsageText: app.Name + " history",
Description: `显示命令历史
示例:
@ -478,11 +478,11 @@ func main() {
3. 显示全部命令历史
aliyunpan history -n 0
`,
Category: "其他",
Category: "其他",
Action: func(c *cli.Context) error {
lineCount := 20
if c.IsSet("n") {
lineCount = c.Int("n")
lineCount = c.Int("n")
}
printTable := func(lines []string) {
tb := cmdtable.NewTable(os.Stdout)
@ -490,7 +490,7 @@ func main() {
tb.SetHeaderAlignment(tablewriter.ALIGN_LEFT)
tb.SetColumnAlignment([]int{tablewriter.ALIGN_LEFT, tablewriter.ALIGN_LEFT})
idx := 1
for _,line := range lines {
for _, line := range lines {
if line == "" {
continue
}
@ -499,13 +499,13 @@ func main() {
}
tb.Render()
}
if contents,err := ioutil.ReadFile(historyFilePath);err == nil {
if contents, err := ioutil.ReadFile(historyFilePath); err == nil {
result := strings.Split(string(contents), "\n")
if lineCount == 0 {
printTable(result)
} else {
outputLine := make([]string, 0)
for idx := len(result)-1; idx >= 0; idx-- {
for idx := len(result) - 1; idx >= 0; idx-- {
line := result[idx]
if line != "" {
outputLine = append(outputLine, line)
@ -515,7 +515,7 @@ func main() {
}
}
lines := make([]string, 0)
for idx := len(outputLine)-1; idx >= 0; idx-- {
for idx := len(outputLine) - 1; idx >= 0; idx-- {
lines = append(lines, outputLine[idx])
}
printTable(lines)

Binary file not shown.

Binary file not shown.

View File

@ -3,13 +3,13 @@
"FileVersion": {
"Major": 0,
"Minor": 1,
"Patch": 1,
"Patch": 2,
"Build": 0
},
"ProductVersion": {
"Major": 0,
"Minor": 1,
"Patch": 1,
"Patch": 2,
"Build": 0
},
"FileFlagsMask": "3f",
@ -22,14 +22,14 @@
"Comments": "",
"CompanyName": "tickstep",
"FileDescription": "阿里云盘客户端",
"FileVersion": "v0.1.1",
"FileVersion": "v0.1.2",
"InternalName": "",
"LegalCopyright": "© 2021 tickstep.",
"LegalTrademarks": "",
"OriginalFilename": "",
"PrivateBuild": "",
"ProductName": "aliyunpan",
"ProductVersion": "v0.1.1",
"ProductVersion": "v0.1.2",
"SpecialBuild": ""
},
"VarFileInfo": {