[osmium-tool] 09/11: Imported Upstream version 1.1.1

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sat Jul 4 14:49:19 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository osmium-tool.

commit 41f01ee0ccb37bf8a0673d11b32660d41993166b
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Jul 4 16:39:44 2015 +0200

    Imported Upstream version 1.1.1
---
 CHANGELOG.md             |  13 +++-
 CMakeLists.txt           |   2 +-
 src/command_fileinfo.cpp |   4 +-
 zsh_completion/_osmium   | 162 +++++++++++++++++++++--------------------------
 4 files changed, 85 insertions(+), 96 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7c13733..ad77ad1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
 ### Fixed
 
 
+## [1.1.1] - 2015-07-04
+
+### Fixed
+
+- Osmium fileinfo --show-variables didn't work properly.
+- Improved zsh autocompletion
+
+
 ## [1.1.0] - 2015-07-04
 
 ### Added
@@ -47,7 +55,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
 - Minor updates to documentation and build system
 
 
-[unreleased]: https://github.com/osmcode/osmium-tool/compare/v1.1.0...HEAD
-[1.0.1]: https://github.com/osmcode/osmium-tool/compare/v1.0.1...v1.1.0
+[unreleased]: https://github.com/osmcode/osmium-tool/compare/v1.1.1...HEAD
+[1.1.1]: https://github.com/osmcode/osmium-tool/compare/v1.1.0...v1.1.1
+[1.1.0]: https://github.com/osmcode/osmium-tool/compare/v1.0.1...v1.1.0
 [1.0.1]: https://github.com/osmcode/osmium-tool/compare/v1.0.0...v1.0.1
 
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc0efa1..8b1c776 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,7 +27,7 @@ project(osmium)
 
 set(OSMIUM_VERSION_MAJOR 1)
 set(OSMIUM_VERSION_MINOR 1)
-set(OSMIUM_VERSION_PATCH 0)
+set(OSMIUM_VERSION_PATCH 1)
 
 set(OSMIUM_VERSION ${OSMIUM_VERSION_MAJOR}.${OSMIUM_VERSION_MINOR}.${OSMIUM_VERSION_PATCH})
 
diff --git a/src/command_fileinfo.cpp b/src/command_fileinfo.cpp
index 9597232..462c33e 100644
--- a/src/command_fileinfo.cpp
+++ b/src/command_fileinfo.cpp
@@ -506,8 +506,6 @@ bool CommandFileinfo::setup(const std::vector<std::string>& arguments) {
     po::store(po::command_line_parser(arguments).options(desc).positional(positional).run(), vm);
     po::notify(vm);
 
-    setup_input_file(vm);
-
     if (vm.count("extended")) {
         m_extended = true;
     }
@@ -547,6 +545,8 @@ bool CommandFileinfo::setup(const std::vector<std::string>& arguments) {
     if (vm.count("show-variables")) {
         std::copy(known_values.cbegin(), known_values.cend(), std::ostream_iterator<std::string>(std::cout, "\n"));
         return false;
+    } else {
+        setup_input_file(vm);
     }
 
     if (vm.count("get")) {
diff --git a/zsh_completion/_osmium b/zsh_completion/_osmium
index 6c4615d..d6d4c1c 100644
--- a/zsh_completion/_osmium
+++ b/zsh_completion/_osmium
@@ -33,132 +33,108 @@ _osmium() {
     fi
 }
 
+_osmium-common-options() {
+    echo '(--verbose)-v[set verbose mode]'
+    echo '(-v)--verbose[set verbose mode]'
+}
+
+_osmium-single-input-options() {
+    echo '(--input-format)-F[format of input OSM file]:OSM file format:_osmium_file_formats'
+    echo '(-F)--input-format[format of input OSM file]:OSM file format:_osmium_file_formats'
+    echo "1:input OSM files:_files -g ${osmium_file_glob}"
+}
+
+_osmium-multiple-inputs-options() {
+    echo '(--input-format)-F[format of input OSM files]:OSM file format:_osmium_file_formats'
+    echo '(-F)--input-format[format of input OSM files]:OSM file format:_osmium_file_formats'
+    echo "*:input OSM files:_files -g ${osmium_file_glob}"
+}
+
+_osmium-output-options() {
+    echo '--generator[generator setting for output file header]:generator:'
+    echo "(--output)-o[output file name]:output OSM file:_files -g ${osmium_file_glob}"
+    echo "(-o)--output[output file name]:output OSM file:_files -g ${osmium_file_glob}"
+    echo '(--output-format)-f[format of output OSM file]:OSM file format:_osmium_file_formats'
+    echo '(-f)--output-format[format of output OSM file]:OSM file format:_osmium_file_formats'
+    echo '(--overwrite)-O[allow overwriting of existing output file]'
+    echo '(-O)--overwrite[allow overwriting of existing output file]'
+}
+
 _osmium-apply-changes() {
     _arguments : \
-        '--generator[generator setting for output file header]:generator:' \
-        '(--input-format)-F[format of input OSM file(s)]:OSM file format:_osmium_file_formats' \
-        '(-F)--input-format[format of input OSM file(s)]:OSM file format:_osmium_file_formats' \
-        "(--output)-o[output file name]:output OSM file:_files -g ${osmium_file_glob}" \
-        "(-o)--output[output file name]:output OSM file:_files -g ${osmium_file_glob}" \
-        '(--output-format)-f[format of output OSM file]:OSM file format:_osmium_file_formats' \
-        '(-f)--output-format[format of output OSM file]:OSM file format:_osmium_file_formats' \
-        '(--overwrite)-O[allow overwriting of existing output file]' \
-        '(-O)--overwrite[allow overwriting of existing output file]' \
+        ${(f)"$(_osmium-common-options)"} \
+        ${(f)"$(_osmium-multiple-inputs-options)"} \
+        ${(f)"$(_osmium-output-options)"} \
         '(--remove-deleted)-r[remove deleted objects]' \
         '(-r)--remove-deleted[remove deleted objects]' \
         '(--simplify)-s[only write last version of any object]' \
-        '(-s)--simplify[only write last version of any object]' \
-        '(--verbose)-v[set verbose mode]' \
-        '(-v)--verbose[set verbose mode]' \
-        "*::input OSM files:_files -g ${osmium_file_glob}"
+        '(-s)--simplify[only write last version of any object]'
 }
 
 _osmium-cat() {
     _arguments : \
-        '--generator[generator setting for output file header]:generator:' \
-        '(--input-format)-F[format of input OSM file(s)]:OSM file format:_osmium_file_formats' \
-        '(-F)--input-format[format of input OSM file(s)]:OSM file format:_osmium_file_formats' \
-        "(--output)-o[output file name]:output OSM file:_files -g ${osmium_file_glob}" \
-        "(-o)--output[output file name]:output OSM file:_files -g ${osmium_file_glob}" \
-        '(--output-format)-f[format of output OSM file]:OSM file format:_osmium_file_formats' \
-        '(-f)--output-format[format of output OSM file]:OSM file format:_osmium_file_formats' \
-        '--output-header[add option for output header]:output header:' \
-        '(--overwrite)-O[allow overwriting of existing output file]' \
-        '(-O)--overwrite[allow overwriting of existing output file]' \
-        '*-t[read only object of given output types]:OSM object type:_osmium_object_type' \
-        '*--object-type[read only object of given output types]:OSM object type:_osmium_object_type' \
-        '(--verbose)-v[set verbose mode]' \
-        '(-v)--verbose[set verbose mode]' \
-        "*::input OSM file:_files -g ${osmium_file_glob}"
+        ${(f)"$(_osmium-common-options)"} \
+        ${(f)"$(_osmium-multiple-inputs-options)"} \
+        ${(f)"$(_osmium-output-options)"} \
+        '*-t[read only object of given output types]:OSM entity type:_osmium_entity_type' \
+        '*--object-type[read only object of given output types]:OSM entity type:_osmium_entity_type'
 }
 
 _osmium-check-refs() {
     _arguments : \
-        '(-F)--input-format=[format of input OSM file]:OSM file format:_osmium_file_formats' \
-        '(--input-format)-F=[format of input OSM file]:OSM file format:_osmium_file_formats' \
+        ${(f)"$(_osmium-common-options)"} \
+        ${(f)"$(_osmium-single-input-options)"} \
         '(--show-ids)-i[show ids of missing objects]' \
         '(-i)--show-ids[show ids of missing objects]' \
         '(--check-relations)-r[also check referential integrity of relations]' \
-        '(-r)--check-relations[also check referential integrity of relations]' \
-        '(--verbose)-v[set verbose mode]' \
-        '(-v)--verbose[set verbose mode]' \
-        "*::input OSM file:_files -g ${osmium_file_glob}"
+        '(-r)--check-relations[also check referential integrity of relations]'
 }
 
 _osmium-fileinfo() {
     _arguments : \
-        '(--extended)-e[show extended info (reads entire file)]' \
-        '(-e)--extended[show extended info (reads entire file)]' \
-        '(-F)--input-format=[format of input OSM file]:OSM file format:_osmium_file_formats' \
-        '(--input-format)-F=[format of input OSM file]:OSM file format:_osmium_file_formats' \
-        "*::input OSM file:_files -g ${osmium_file_glob}"
+        ${(f)"$(_osmium-common-options)"} \
+        ${(f)"$(_osmium-single-input-options)"} \
+        '(--show-variables -G --extended)-e[show extended info (reads entire file)]' \
+        '(--show-variables -G -e)--extended[show extended info (reads entire file)]' \
+        '(--show-variables -G --json -j --get)-g[get value for one variable]:variable:_osmium_fileinfo_variables' \
+        '(--show-variables -G --json -j -g)--get[get value for one variable]:variable:_osmium_fileinfo_variables' \
+        '(--get -g --json)-j[output variables in JSON format]' \
+        '(--get -g -j)--json[output variables in JSON format]' \
+        '(--get -g --json -j --extended -e --show-variables)-G[show a list of all variable names]' \
+        '(--get -g --json -j --extended -e -G)--show-variables[show a list of all variable names]'
 }
 
 _osmium-getid() {
     _arguments : \
-        '--generator[generator setting for output file header]:generator:' \
-        '(--input-format)-F[format of input OSM file]:OSM file format:_osmium_file_formats' \
-        '(-F)--input-format[format of input OSM file]:OSM file format:_osmium_file_formats' \
-        "(--output)-o[output file name]:output OSM file:_files -g ${osmium_file_glob}" \
-        "(-o)--output[output file name]:output OSM file:_files -g ${osmium_file_glob}" \
-        '(--output-format)-f[format of output OSM file]:OSM file format:_osmium_file_formats' \
-        '(-f)--output-format[format of output OSM file]:OSM file format:_osmium_file_formats' \
-        '(--overwrite)-O[allow overwriting of existing output file]' \
-        '(-O)--overwrite[allow overwriting of existing output file]' \
-        '(--verbose)-v[set verbose mode]' \
-        '(-v)--verbose[set verbose mode]' \
-        "1::input OSM file:_files -g ${osmium_file_glob}" \
-        "*::ids (format\: [nwr]NUM):"
+        ${(f)"$(_osmium-common-options)"} \
+        ${(f)"$(_osmium-single-input-options)"} \
+        ${(f)"$(_osmium-output-options)"} \
+        "*:IDs (format\: [nwr]NUM):"
 }
 
 _osmium-merge-changes() {
     _arguments : \
-        '--generator[generator setting for output file header]:generator:' \
-        '(--input-format)-F[format of input OSM file(s)]:OSM file format:_osmium_file_formats' \
-        '(-F)--input-format[format of input OSM file(s)]:OSM file format:_osmium_file_formats' \
-        "(--output)-o[output file name]:output OSM file:_files -g ${osmium_file_glob}" \
-        "(-o)--output[output file name]:output OSM file:_files -g ${osmium_file_glob}" \
-        '(--output-format)-f[format of output OSM file]:OSM file format:_osmium_file_formats' \
-        '(-f)--output-format[format of output OSM file]:OSM file format:_osmium_file_formats' \
-        '(--overwrite)-O[allow overwriting of existing output file]' \
-        '(-O)--overwrite[allow overwriting of existing output file]' \
+        ${(f)"$(_osmium-common-options)"} \
+        ${(f)"$(_osmium-multiple-inputs-options)"} \
+        ${(f)"$(_osmium-output-options)"} \
         '(--simplify)-s[only write last version of any object]' \
-        '(-s)--simplify[only write last version of any object]' \
-        '(--verbose)-v[set verbose mode]' \
-        '(-v)--verbose[set verbose mode]' \
-        "*::input OSM files:_files -g ${osmium_file_glob}"
+        '(-s)--simplify[only write last version of any object]'
 }
 
 _osmium-renumber() {
     _arguments : \
-        '--generator[generator setting for output file header]:generator:' \
-        '(--input-format)-F[format of input OSM file]:OSM file format:_osmium_file_formats' \
-        '(-F)--input-format[format of input OSM file]:OSM file format:_osmium_file_formats' \
-        "(--output)-o[output file name]:output OSM file:_files -g ${osmium_file_glob}" \
-        "(-o)--output[output file name]:output OSM file:_files -g ${osmium_file_glob}" \
-        '(--output-format)-f[format of output OSM file]:OSM file format:_osmium_file_formats' \
-        '(-f)--output-format[format of output OSM file]:OSM file format:_osmium_file_formats' \
-        '(--overwrite)-O[allow overwriting of existing output file]' \
-        '(-O)--overwrite[allow overwriting of existing output file]' \
-        '(--verbose)-v[set verbose mode]' \
-        '(-v)--verbose[set verbose mode]' \
-        "1::input OSM file:_files -g ${osmium_file_glob}"
+        ${(f)"$(_osmium-common-options)"} \
+        ${(f)"$(_osmium-single-input-options)"} \
+        ${(f)"$(_osmium-output-options)"} \
+        '(--index-directory)-i[read/write index files in this directory]:directory:_path_files -/' \
+        '(-i)--index-directory[read/write index files in this directory]:directory:_path_files -/'
 }
 
 _osmium-time-filter() {
     _arguments : \
-        '--generator[generator setting for output file header]:generator:' \
-        '(--input-format)-F[format of input OSM file]:OSM file format:_osmium_file_formats' \
-        '(-F)--input-format[format of input OSM file]:OSM file format:_osmium_file_formats' \
-        "(--output)-o[output file name]:output OSM file:_files -g ${osmium_file_glob}" \
-        "(-o)--output[output file name]:output OSM file:_files -g ${osmium_file_glob}" \
-        '(--output-format)-f[format of output OSM file]:OSM file format:_osmium_file_formats' \
-        '(-f)--output-format[format of output OSM file]:OSM file format:_osmium_file_formats' \
-        '(--overwrite)-O[allow overwriting of existing output file]' \
-        '(-O)--overwrite[allow overwriting of existing output file]' \
-        '(--verbose)-v[set verbose mode]' \
-        '(-v)--verbose[set verbose mode]' \
-        "1::input OSM file:_files -g ${osmium_file_glob}" \
+        ${(f)"$(_osmium-common-options)"} \
+        ${(f)"$(_osmium-single-input-options)"} \
+        ${(f)"$(_osmium-output-options)"} \
         "2::start time (format\: yyyy-mm-ddThh\:mm\:ssZ):" \
         "3::end time (format\: yyyy-mm-ddThh\:mm\:ssZ):"
 }
@@ -177,14 +153,18 @@ _osmium_file_formats() {
         'pbf[PBF format]'
 }
 
-_osmium_object_type() {
-    _values 'OSM object type' \
+_osmium_entity_type() {
+    _values 'OSM entity type' \
         'node' \
         'way' \
         'relation' \
         'changeset'
 }
 
+_osmium_fileinfo_variables() {
+    _values 'variable' $(osmium fileinfo --show-variables)
+}
+
 _osmium-help() {
     local -a osmium_help_topics
     osmium_help_topics=(apply-changes cat check-refs fileinfo getid help merge-changes renumber time-filter file-formats)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmium-tool.git



More information about the Pkg-grass-devel mailing list