mirror of
https://github.com/taigrr/yq
synced 2025-01-18 04:53:17 -08:00
Update docs
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
@@ -10,27 +13,37 @@
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="../assets/images/favicon.png">
|
||||
<meta name="lang:clipboard.copy" content="Copy to clipboard">
|
||||
|
||||
<meta name="generator" content="mkdocs-0.16.3, mkdocs-material-1.10.1">
|
||||
<meta name="lang:clipboard.copied" content="Copied to clipboard">
|
||||
|
||||
<meta name="lang:search.language" content="en">
|
||||
|
||||
<meta name="lang:search.result.none" content="No matching documents">
|
||||
|
||||
<meta name="lang:search.result.one" content="1 matching document">
|
||||
|
||||
<meta name="lang:search.result.other" content="# matching documents">
|
||||
|
||||
<meta name="lang:search.tokenizer" content="[\s\-]+">
|
||||
|
||||
<link rel="shortcut icon" href="../assets/images/favicon.png">
|
||||
<meta name="generator" content="mkdocs-0.17.2, mkdocs-material-2.2.5">
|
||||
|
||||
|
||||
|
||||
<title>Merge - Yaml</title>
|
||||
<title>Merge - Yq</title>
|
||||
|
||||
|
||||
|
||||
<script src="../assets/javascripts/modernizr-e826f8942a.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../assets/stylesheets/application-a20f419c8e.css">
|
||||
<link rel="stylesheet" href="../assets/stylesheets/application.bcabdff3.css">
|
||||
|
||||
|
||||
|
||||
<script src="../assets/javascripts/modernizr.1aa3b519.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono">
|
||||
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
|
||||
|
||||
@@ -40,9 +53,6 @@
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
<svg class="md-svg">
|
||||
@@ -61,9 +71,9 @@
|
||||
<nav class="md-header-nav md-grid">
|
||||
<div class="md-flex">
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
<a href=".." title="Yaml" class="md-header-nav__button md-logo">
|
||||
<a href=".." title="Yq" class="md-header-nav__button md-logo">
|
||||
|
||||
<i class="md-icon md-icon--home"></i>
|
||||
<i class="md-icon"></i>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
@@ -71,19 +81,24 @@
|
||||
<label class="md-icon md-icon--menu md-header-nav__button" for="drawer"></label>
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--stretch">
|
||||
<span class="md-flex__ellipsis md-header-nav__title">
|
||||
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
|
||||
|
||||
|
||||
|
||||
<span class="md-header-nav__topic">
|
||||
Yq
|
||||
</span>
|
||||
<span class="md-header-nav__topic">
|
||||
Merge
|
||||
</span>
|
||||
|
||||
Merge
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
|
||||
<label class="md-icon md-icon--search md-header-nav__button" for="search"></label>
|
||||
|
||||
<label class="md-icon md-icon--search md-header-nav__button" for="search"></label>
|
||||
|
||||
<div class="md-search" data-md-component="search" role="dialog">
|
||||
<label class="md-search__overlay" for="search"></label>
|
||||
<div class="md-search__inner">
|
||||
@@ -94,8 +109,8 @@
|
||||
</form>
|
||||
<div class="md-search__output">
|
||||
<div class="md-search__scrollwrap" data-md-scrollfix>
|
||||
<div class="md-search-result" data-md-component="result" data-md-lang-search="" data-md-lang-tokenizer="[\s\-]+">
|
||||
<div class="md-search-result__meta" data-md-lang-result-none="No matching documents" data-md-lang-result-one="1 matching document" data-md-lang-result-other="# matching documents">
|
||||
<div class="md-search-result" data-md-component="result">
|
||||
<div class="md-search-result__meta">
|
||||
Type to start searching
|
||||
</div>
|
||||
<ol class="md-search-result__list"></ol>
|
||||
@@ -104,6 +119,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -115,7 +131,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/mikefarah/yaml" title="Go to repository" class="md-source" data-md-source="github">
|
||||
<a href="https://github.com/mikefarah/yq/" title="Go to repository" class="md-source" data-md-source="github">
|
||||
|
||||
<div class="md-source__icon">
|
||||
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||
@@ -124,7 +140,7 @@
|
||||
</div>
|
||||
|
||||
<div class="md-source__repository">
|
||||
mikefarah/yaml
|
||||
mikefarah/yq
|
||||
</div>
|
||||
</a>
|
||||
|
||||
@@ -137,6 +153,8 @@
|
||||
|
||||
<div class="md-container">
|
||||
|
||||
|
||||
|
||||
|
||||
<main class="md-main">
|
||||
<div class="md-main__inner md-grid" data-md-component="container">
|
||||
@@ -147,12 +165,12 @@
|
||||
<div class="md-sidebar__inner">
|
||||
<nav class="md-nav md-nav--primary" data-md-level="0">
|
||||
<label class="md-nav__title md-nav__title--site" for="drawer">
|
||||
<div class="md-nav__button md-logo">
|
||||
<span class="md-nav__button md-logo">
|
||||
|
||||
<i class="md-icon md-icon--home"></i>
|
||||
<i class="md-icon"></i>
|
||||
|
||||
</div>
|
||||
Yaml
|
||||
</span>
|
||||
Yq
|
||||
</label>
|
||||
|
||||
<div class="md-nav__source">
|
||||
@@ -162,7 +180,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/mikefarah/yaml" title="Go to repository" class="md-source" data-md-source="github">
|
||||
<a href="https://github.com/mikefarah/yq/" title="Go to repository" class="md-source" data-md-source="github">
|
||||
|
||||
<div class="md-source__icon">
|
||||
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||
@@ -171,7 +189,7 @@
|
||||
</div>
|
||||
|
||||
<div class="md-source__repository">
|
||||
mikefarah/yaml
|
||||
mikefarah/yq
|
||||
</div>
|
||||
</a>
|
||||
|
||||
@@ -364,12 +382,14 @@
|
||||
<article class="md-content__inner md-typeset">
|
||||
|
||||
|
||||
<a href="https://github.com/mikefarah/yq/edit/master/docs/merge.md" title="Edit this page" class="md-icon md-content__icon"></a>
|
||||
|
||||
|
||||
<h1>Merge</h1>
|
||||
|
||||
<p>Yaml files can be merged using the 'merge' command. Each additional file merged with the first file will
|
||||
set values for any key not existing already or where the key has no value.</p>
|
||||
<pre><code>yaml m <yaml_file|json_file> <path>...
|
||||
<pre><code>yq m <yaml_file|json_file> <path>...
|
||||
</code></pre>
|
||||
|
||||
<p>This command can take a json file as input too, and will output yaml unless specified to export as json (-j)</p>
|
||||
@@ -386,7 +406,7 @@ c:
|
||||
</code></pre>
|
||||
|
||||
<p>then</p>
|
||||
<pre><code class="bash">yaml m data1.yaml data2.yaml
|
||||
<pre><code class="bash">yq m data1.yaml data2.yaml
|
||||
</code></pre>
|
||||
|
||||
<p>will output:</p>
|
||||
@@ -409,7 +429,7 @@ c:
|
||||
</code></pre>
|
||||
|
||||
<p>then</p>
|
||||
<pre><code class="bash">yaml m -i data1.yaml data2.yaml
|
||||
<pre><code class="bash">yq m -i data1.yaml data2.yaml
|
||||
</code></pre>
|
||||
|
||||
<p>will update the data1.yaml file so that the value of 'c' is 'test: 1'.</p>
|
||||
@@ -426,7 +446,7 @@ c:
|
||||
</code></pre>
|
||||
|
||||
<p>then</p>
|
||||
<pre><code class="bash">yaml m -x data1.yaml data2.yaml
|
||||
<pre><code class="bash">yq m -x data1.yaml data2.yaml
|
||||
</code></pre>
|
||||
|
||||
<p>will output:</p>
|
||||
@@ -451,7 +471,7 @@ d: false
|
||||
</code></pre>
|
||||
|
||||
<p>then</p>
|
||||
<pre><code class="bash">yaml m -x data1.yaml data3.yaml
|
||||
<pre><code class="bash">yq m -x data1.yaml data3.yaml
|
||||
</code></pre>
|
||||
|
||||
<p>will output:</p>
|
||||
@@ -506,9 +526,9 @@ currently handle merging values within an array.</p>
|
||||
<div class="md-footer-copyright">
|
||||
|
||||
powered by
|
||||
<a href="http://www.mkdocs.org" title="MkDocs">MkDocs</a>
|
||||
<a href="http://www.mkdocs.org">MkDocs</a>
|
||||
and
|
||||
<a href="http://squidfunk.github.io/mkdocs-material/" title="Material for MkDocs">
|
||||
<a href="https://squidfunk.github.io/mkdocs-material/">
|
||||
Material for MkDocs</a>
|
||||
</div>
|
||||
|
||||
@@ -530,10 +550,9 @@ currently handle merging values within an array.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../assets/javascripts/application-f3ab9e5ff8.js"></script>
|
||||
<script src="../assets/javascripts/application.6cdc17f0.js"></script>
|
||||
|
||||
|
||||
<script>app.initialize({url:{base:".."}})</script>
|
||||
<script>app.initialize({version:"0.17.2",url:{base:".."}})</script>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user