@@ 54,6 54,7 @@ Available Commands:
Flags:
-d, --database string Path to SQLite3 database file. (default "~/.tago/tago.db")
+ -f, --fullpath Use full path for all files (disabled relative path display.)
-h, --help help for tago
-v, --version version for tago
@@ 91,6 91,11 @@ func ValidateTagName(tag string) (string
// RelativePath shows relative path from the current directory
func RelativePath(path string) string {
+ if fullPath {
+ // Do not use relative path with fullPath is switched on
+ return path
+ }
+
addSep := func(path string) string {
if path[len(path)-1] == filepath.Separator {
return path
@@ 6,7 6,10 @@ import (
"github.com/spf13/cobra"
)
-var dbFile string
+var (
+ dbFile string
+ fullPath bool
+)
var rootCmd = &cobra.Command{
Use: "tago",
@@ 20,6 23,10 @@ func init() {
&dbFile, "database", "d", "~/.tago/tago.db",
"Path to SQLite3 database file.",
)
+ rootCmd.PersistentFlags().BoolVarP(
+ &fullPath, "fullpath", "f", false,
+ "Use full path for all files (disabled relative path display.)",
+ )
}
// Execute main cobra caller