在 $HOME/.dlv/config.yml 中設定路徑的任何示例?我試過設定:
案例 1(在 from 和 to 中帶引號)替代路徑:
{"from":
"/private/var/tmp/_bazel/d3eb9a0ef06857aebc54b41ff425d2ee"
"to": "/Users/xxx/code/src"}
案例 2:(在 from 和 to 中不帶引號)替代路徑:
{from:
"/private/var/tmp/_bazel/d3eb9a0ef06857aebc54b41ff425d2ee"
to: "/Users/xxx/code/src"}
案例2:(在'{from'之前有連字符)替代路徑:
-{from:
"/private/var/tmp/_bazel/d3eb9a0ef06857aebc54b41ff425d2ee"
to: "/Users/xxx/code/src"}
案例2:(在'{from'之前有連字符)替代路徑:
-{"from":
"/private/var/tmp/_bazel/d3eb9a0ef06857aebc54b41ff425d2ee"
"to": "/Users/xxx/code/src"}
所有 4 種情況都因配置而失敗。錯誤。任何作業樣本來設定路徑?
uj5u.com熱心網友回復:
我想你錯過了一個空間。僅當值或鍵中包含空格或某些其他不可列印的非 ascii 字符時,引號才相關。
這里的配置,沒有注釋:
$ cat ~/.config/dlv/config.yml | sed '/^#/d; /^$/d'
aliases:
# command: ["alias1", "alias2"]
substitute-path:
- {from: /my/source/code/was/here, to: /but/now/its/here}
debug-info-directories: ["/usr/lib/debug/.build-id"]
似乎是有效的 yaml:
$ yq < ~/.config/dlv/config.yml
{
"aliases": null,
"substitute-path": [
{
"from": "/my/source/code/was/here",
"to": "/but/now/its/here"
}
],
"debug-info-directories": [
"/usr/lib/debug/.build-id"
]
}
yq 工具是 jq 的包裝器。
$ yq --help | sed 8q
usage: yq [options] <jq filter> [input file...]
[jq_filter] [files [files ...]]
yq: Command-line YAML processor - jq wrapper for YAML documents
yq transcodes YAML documents to JSON and passes them to jq.
See https://github.com/kislyuk/yq for more information.
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/460874.html
上一篇:VS配置屬性存盤在哪里
下一篇:如果提示為空,如何停止js腳本
