Skip to content

Commit

Permalink
v0.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
shenwei356 committed Aug 22, 2016
1 parent bfa84d3 commit 8ad3947
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 17 deletions.
4 changes: 2 additions & 2 deletions csvtk/cmd/cut.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ var cutCmd = &cobra.Command{
colnamesMap = make(map[string]*regexp.Regexp, len(colnames))
for _, col := range colnames {
if negativeFields {
colnamesMap[col[1:]] = fuzzyField2Regexp(col)
colnamesMap[col[1:]] = fuzzyField2Regexp(col[1:])
} else {
colnamesMap[col] = fuzzyField2Regexp(col)
}
Expand All @@ -140,7 +140,7 @@ var cutCmd = &cobra.Command{
} else {
_, ok = colnamesMap[col]
}
if (negativeFields && !ok) || (!negativeFields && ok) {
if ok {
fields = append(fields, colnames2fileds[col])
}
}
Expand Down
2 changes: 1 addition & 1 deletion csvtk/cmd/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ var filterCmd = &cobra.Command{
} else {
_, ok = colnamesMap[col]
}
if (negativeFields && !ok) || (!negativeFields && ok) {
if ok {
fields = append(fields, colnames2fileds[col])
}
}
Expand Down
2 changes: 1 addition & 1 deletion csvtk/cmd/grep.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ var grepCmd = &cobra.Command{
} else {
_, ok = colnamesMap[col]
}
if (negativeFields && !ok) || (!negativeFields && ok) {
if ok {
fields = append(fields, colnames2fileds[col])
}
}
Expand Down
2 changes: 1 addition & 1 deletion csvtk/cmd/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
)

// VERSION of csvtk
const VERSION = "0.3.6"
const VERSION = "0.3.7"

func checkError(err error) {
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion csvtk/cmd/inter.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ var interCmd = &cobra.Command{
} else {
_, ok = colnamesMap[col]
}
if (negativeFields && !ok) || (!negativeFields && ok) {
if ok {
fields = append(fields, colnames2fileds[col])
}
}
Expand Down
2 changes: 1 addition & 1 deletion csvtk/cmd/mutate.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ var mutateCmd = &cobra.Command{
} else {
_, ok = colnamesMap[col]
}
if (negativeFields && !ok) || (!negativeFields && ok) {
if ok {
fields = append(fields, colnames2fileds[col])
}
}
Expand Down
2 changes: 1 addition & 1 deletion csvtk/cmd/rename.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ var renameCmd = &cobra.Command{
} else {
_, ok = colnamesMap[col]
}
if (negativeFields && !ok) || (!negativeFields && ok) {
if ok {
fields = append(fields, colnames2fileds[col])
}
}
Expand Down
2 changes: 1 addition & 1 deletion csvtk/cmd/rename2.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ var rename2Cmd = &cobra.Command{
} else {
_, ok = colnamesMap[col]
}
if (negativeFields && !ok) || (!negativeFields && ok) {
if ok {
fields = append(fields, colnames2fileds[col])
}
}
Expand Down
2 changes: 1 addition & 1 deletion csvtk/cmd/replace.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Special repalcement symbols:
} else {
_, ok = colnamesMap[col]
}
if (negativeFields && !ok) || (!negativeFields && ok) {
if ok {
fields = append(fields, colnames2fileds[col])
}
}
Expand Down
2 changes: 1 addition & 1 deletion csvtk/cmd/uniq.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ var uniqCmd = &cobra.Command{
} else {
_, ok = colnamesMap[col]
}
if (negativeFields && !ok) || (!negativeFields && ok) {
if ok {
fields = append(fields, colnames2fileds[col])
}
}
Expand Down
8 changes: 5 additions & 3 deletions doc/docs/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@

## Current Version

- [csvtk v0.3.6](https://github.com/shenwei356/csvtk/releases/tag/v0.3.6)
- `csvtk replace` support replacement symbols `{nr}` (record number)
and `{kv}` (corresponding value of the key ($1) by key-value file)
- [csvtk v0.3.7](https://github.com/shenwei356/csvtk/releases/tag/v0.3.7)
- fix a serious bug of using negative field of column name, e.g. `-f "-id"`

## Installation

Expand Down Expand Up @@ -42,6 +41,9 @@ For Go developer, just one command:

## Previous Versions

- [csvtk v0.3.6](https://github.com/shenwei356/csvtk/releases/tag/v0.3.6)
- `csvtk replace` support replacement symbols `{nr}` (record number)
and `{kv}` (corresponding value of the key ($1) by key-value file)
- [csvtk v0.3.5.2](https://github.com/shenwei356/csvtk/releases/tag/v0.3.6)
- add flag `--fill` for `csvtk join`, so we can fill the unmatched data
- fix typo
Expand Down
4 changes: 2 additions & 2 deletions doc/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ pages:
- Tutorial: tutorial.md
- Links:
- Wei Shen's Bioinformatic tools: bioinf.md
theme: mkdocs
theme: yeti

repo_url: https://github.com/shenwei356/csvtk
site_description: csvtk - CSV/TSV toolkit
site_author: shenwei356
google_analytics: ['UA-28948626-9', 'blog.shenwei.me/csvtk']
google_analytics: ['UA-28948626-9', 'bioinf.shenwei.me/csvtk']
2 changes: 1 addition & 1 deletion doc/site
Submodule site updated from 4057a2 to ae446e

0 comments on commit 8ad3947

Please sign in to comment.