Skip to content

Commit 722713c

Browse files
committed
update docs on tsvtk again
1 parent e3f0a7f commit 722713c

5 files changed

Lines changed: 13 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ _testmain.go
2626
doc/site/*
2727
*.Rhistory
2828
csvtk/csvtk*
29+
csvtk/tsvtk
2930
csvtk/binaries*
3031
doc/site
3132
*ssshtest

csvtk/cmd/helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ func getConfigs(cmd *cobra.Command) Config {
305305
var tabs bool
306306
if val = os.Getenv("CSVTK_T"); val != "" {
307307
tabs = isTrue(val)
308-
} else if os.Args[0] == "tsvtk" {
308+
} else if filepath.Base(os.Args[0]) == "tsvtk" {
309309
tabs = true
310310
} else {
311311
tabs = getFlagBool(cmd, "tabs")

csvtk/cmd/root.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ Environment variables for frequently used global flags:
7474
- "CSVTK_H" for flag "-H/--no-header-row"
7575
- "CSVTK_QUIET" for flag "--quiet"
7676
77+
You can also create a symbolic link named "tsvtk" to csvtk, or simply create a copy
78+
of the executable called "tsvtk". When invoked as "tsvtk", csvtk will automatically
79+
enable the "-t/--tabs" flag.
80+
7781
`, VERSION),
7882

7983
Run: func(cmd *cobra.Command, args []string) {

doc/docs/faq.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,6 @@ Environment variables for frequently used global flags:
8585
- `CSVTK_H` for flag `-H/--no-header-row`
8686
- `CSVTK_QUIET` for flag `--quiet`
8787

88-
You can also create a soft link named `tsvtk` for `csvtk`, which sets `-t/--tabs` by default.
88+
You can also create a symbolic link named `tsvtk` to `csvtk`, or simply create a copy
89+
of the executable called `tsvtk`. When invoked as `tsvtk`, `csvtk` will automatically
90+
enable the `-t/--tabs` flag.

doc/docs/usage.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ Environment variables for frequently used global flags:
175175
- "CSVTK_T" for flag "-t/--tabs"
176176
- "CSVTK_H" for flag "-H/--no-header-row"
177177
- "CSVTK_QUIET" for flag "--quiet"
178+
179+
You can also create a symbolic link named "tsvtk" to csvtk, or simply create a copy
180+
of the executable called "tsvtk". When invoked as "tsvtk", csvtk will automatically
181+
enable the "-t/--tabs" flag.
178182
179183
Usage:
180184
csvtk [flags]

0 commit comments

Comments
 (0)