From b31f6f9fcc45dcbe3760d4838f2aa3011c9ccd70 Mon Sep 17 00:00:00 2001 From: Josef Pihrt Date: Sun, 14 Nov 2021 13:51:58 +0100 Subject: [PATCH] Change version to 0.3.0-rc --- CHANGELOG.md | 29 + docs/cli/OptionValues.md | 53 +- docs/cli/README.md | 30 +- docs/cli/copy-command.md | 172 +++-- docs/cli/delete-command.md | 154 ++-- docs/cli/find-command.md | 166 +++-- docs/cli/help-command.md | 22 +- docs/cli/manual.txt | 1058 +++++++++++++++------------- docs/cli/move-command.md | 172 +++-- docs/cli/regex-escape-command.md | 69 ++ docs/cli/regex-list-command.md | 107 +++ docs/cli/regex-match-command.md | 85 +++ docs/cli/regex-split-command.md | 90 +++ docs/cli/rename-command.md | 167 +++-- docs/cli/replace-command.md | 176 +++-- docs/cli/spellcheck-command.md | 183 +++-- docs/cli/sync-command.md | 168 +++-- src/CommandLine/CommandLine.csproj | 2 +- src/CommandLine/PackageInfo.cs | 2 +- src/Directory.Build.props | 2 +- src/FileSystem/FileSystem.csproj | 2 +- tools/build.cmd | 2 +- tools/reinstall_tool.cmd | 2 +- tools/reinstall_tool_debug.cmd | 2 +- 24 files changed, 1926 insertions(+), 989 deletions(-) create mode 100644 docs/cli/regex-escape-command.md create mode 100644 docs/cli/regex-list-command.md create mode 100644 docs/cli/regex-match-command.md create mode 100644 docs/cli/regex-split-command.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 64f87c50..cccbac61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,32 @@ +## 0.3.0-rc (2021-11-14) + +* Change shortcut for `--attributes-to-skip` from `-b` to `-A` +* Empty name pattern matches entire name (or its part): `--name ""` +* Empty content pattern matches entire file's content: `--content ""` +* Matching lines/values are not indented by default +* Add allowed values for option `--modify` + * `count` + * `sort-by=count` +* Add option `--max-matches-in-file` +* Add option `--max-matching-files` +* Add option `--max-word-length` (command `spellcheck`) +* Add option `-P,--no-path` (a shortcut for `--path-mode omit`) +* Add option `-C,--no-content` (a shortcut for `--content-mode omit`) +* Deprecate option `--display` and replace it with: + * `--after-context` + * `--before-context` + * `--content-mode` + * `--context` + * `--count` + * `--line-number` + * `--path-mode` + * `-u,--summary` + * `--align-columns` +* Deprecate command `escape` and replace it with `regex escape` +* Deprecate command `list-patterns` and replace it with `regex list` +* Deprecate command `match` and replace it with `regex match` +* Deprecate command `split` and replace it with `regex split` + ## 0.2.2 (2021-07-21) * Add command `sync` ([commit](https://github.com/JosefPihrt/Roslynator/commit/81b2f412f81edb4f205195226777f0a7f565a350)) diff --git a/docs/cli/OptionValues.md b/docs/cli/OptionValues.md index dd160507..6c98939b 100644 --- a/docs/cli/OptionValues.md +++ b/docs/cli/OptionValues.md @@ -4,17 +4,15 @@ * [\](#attributes) * [\](#compare_options) * [\](#conflict_resolution) -* [\](#content_display) -* [\](#display_options) +* [\](#content_mode) * [\](#extension_options) * [\](#file_properties) * [\](#highlight) * [\](#input_options) -* [\](#max_options) * [\](#modify_options) * [\](#name_part) * [\](#output_options) -* [\](#path_display) +* [\](#path_mode) * [\](#pattern_options) * [\](#pipe_mode) * [\](#regex_options) @@ -74,7 +72,7 @@ | suffix | | Add suffix to file name if it already exists\. | | skip | s | Do not copy or move a file if it already exists\. | -## \ +## \ | Value | | Description | | ---------------- | --- | ---------------------------------------------------------------------------------------- | @@ -85,26 +83,6 @@ | value\-detail | d | Display matched value and include information about each value such as index or length\. | | omit | o | Do not display file's content\. | -## \ - -| Value | | Description | -| ---------------------------------------------- | --- | ---------------------------------------------------------------------- | -| content=[\](#content_display) | c | | -| context=\ | co | A number of lines to display before and after matching line\. | -| context\-before=\ | b | A number of lines to display before matching line\. | -| context\-after=\ | a | A number of lines to display after matching line\. | -| count | c | Include number of matches in file\. | -| creation\-time | ct | Include file creation time\. | -| indent=\ | | Indentation for a list of results\. Default indentation are 2 spaces\. | -| line\-number | l | Include line number\. | -| modified\-time | mt | Include file last modified time\. | -| no\-align | | Do not align columns\. | -| path=[\](#path_display) | p | | -| size | s | Include file size\. | -| separator=\ | s | String that separate each value\. | -| summary | su | Include summary\. | -| trim\-line | | Trim leading and trailing white\-space from a line\. | - ## \ | Value | | Description | @@ -119,11 +97,11 @@ ## \ -| Value | | Description | -| ---------------------- | --- | --------------------------------------------------------------------------------- | -| creation\-time=\ | ct | Filter files by creation time \(See 'Expression syntax' for other expressions\)\. | -| modified\-time=\ | mt | Filter files by modified time \(See 'Expression syntax' for other expressions\)\. | -| size=\ | s | Filter files by size \(See 'Expression syntax' for other expressions\)\. | +| Value | | Description | +| ---------------------- | --- | ------------------------------------------------------------------------------------------------------------- | +| creation\-time=\ | ct | Show file's creation time and optionally define condition \(See 'Expression syntax' for other expressions\)\. | +| modified\-time=\ | mt | Show file's modified time and optionally define condition \(See 'Expression syntax' for other expressions\)\. | +| size=\ | s | Show file's size and optionally define condition \(See 'Expression syntax' for other expressions\)\. | ## \ @@ -150,13 +128,6 @@ | ------ | --- | ------------------------------------------------------------------------------ | | escape | e | Interpret literals \\a, \\b, \\f, \\n, \\r, \\t and \\v as character escapes\. | -## \ - -| Value | | Description | -| -------------- | --- | --------------------------------------------------------------- | -| \ | | Stop searching after \ matching files and/or directories\. | -| matches=\ | m | Stop searching in each file after \ matches\. | - ## \ | Value | | Description | @@ -170,6 +141,7 @@ | except | | Return values from first file except values from second file\. | | intersect | | Return values that were found in all files\. | | group | | Group matching files by matched values\. | +| count | | Show number of values in a group\. | | ignore\-case | i | Use case\-insensitive matching\. | | remove\-empty | re | Remove values that are empty strings\. | | remove\-white\-space | rw | Remove values that are empty or consist of white\-space\. | @@ -197,7 +169,7 @@ | verbosity=[\](#verbosity) | v | | | append | a | If the file exists output will be appended to the end of the file\. | -## \ +## \ | Value | | Description | | -------- | --- | ----------------------------------------------- | @@ -294,6 +266,7 @@ | Value | | Description | | ------ | --- | ------------------------------- | | length | l | Sort values by value's length\. | +| count | c | Sort values by group's count\. | ## \ @@ -317,8 +290,10 @@ | miscellaneous | m | | | named\-blocks | n | | | options | o | | +| regex\-options | ro | | | quantifiers | q | | | substitutions | s | | +| all | | | ## \ @@ -341,6 +316,6 @@ | `x>=n` | | `x=` | Inclusive interval | | `x=(min;max)` | Exclusive interval | -| `x=-d\|[d.]hh:mm[:ss]` | x is greater than actual date \- \ | +| `x=-d|[d.]hh:mm[:ss]` | x is greater than actual date \- \ | *\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* \ No newline at end of file diff --git a/docs/cli/README.md b/docs/cli/README.md index eb35eccc..0844aa52 100644 --- a/docs/cli/README.md +++ b/docs/cli/README.md @@ -4,21 +4,21 @@ Search, replace, rename and delete files and its content using the power of \.NE ## Commands -| Command | Description | -| ----------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| [copy](copy-command.md) | Searches the file system for files and directories and copy them to a destination directory\. | -| [delete](delete-command.md) | Deletes files and directories\. | -| [escape](escape-command.md) | Escapes special characters by replacing them with their escape codes\. | -| [find](find-command.md) | Searches the file system for files and directories and optionally searches files' content\. | -| [help](help-command.md) | Displays help\. | -| [list-patterns](list-patterns-command.md) | Lists regular expression patterns\. | -| [match](match-command.md) | Searches the input string for occurrences of the regular expression\. | -| [move](move-command.md) | Searches the file system for files and directories and move them to a destination directory\. | -| [rename](rename-command.md) | Renames files and directories\. | -| [replace](replace-command.md) | Searches the file system for files and replaces its content\. | -| [spellcheck](spellcheck-command.md) | Searches the files' content for potential misspellings and typos\. | -| [split](split-command.md) | Splits the input string into an list of substrings at the positions defined by a regular expression\. | -| [sync](sync-command.md) | Synchronizes content of two directories\. | +| Command | Description | +| --------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| [copy](copy-command.md) | Searches the file system for files and directories and copy them to a destination directory\. | +| [delete](delete-command.md) | Deletes files and directories\. | +| [find](find-command.md) | Searches the file system for files and directories and optionally searches files' content\. | +| [help](help-command.md) | Displays help\. | +| [move](move-command.md) | Searches the file system for files and directories and move them to a destination directory\. | +| [regex escape](regex-escape-command.md) | Escapes special characters by replacing them with their escape codes\. | +| [regex list](regex-list-command.md) | Lists regular expression patterns\. | +| [regex match](regex-match-command.md) | Searches the input string for occurrences of the regular expression\. | +| [regex split](regex-split-command.md) | Splits the input string into an list of substrings at the positions defined by a regular expression\. | +| [rename](rename-command.md) | Renames files and directories\. | +| [replace](replace-command.md) | Searches the file system for files and replaces its content\. | +| [spellcheck](spellcheck-command.md) | Searches the files' content for potential misspellings and typos\. | +| [sync](sync-command.md) | Synchronizes content of two directories\. | ## Exit Code diff --git a/docs/cli/copy-command.md b/docs/cli/copy-command.md index ab93a203..6dbefac3 100644 --- a/docs/cli/copy-command.md +++ b/docs/cli/copy-command.md @@ -7,32 +7,44 @@ Searches the file system for files and directories and copy them to a destinatio ## Synopsis ``` -orang copy [] -[ --ask] -[-a|--attributes] -[-b|--attributes-to-skip] -[ --compare] -[ --conflict] -[-c|--content] [] -[-y|--display] -[-d|--dry-run] -[ --encoding] -[-e|--extension] EXT1[,EXT2] [] -[ --flat] -[-h|--help] -[-t|--highlight] -[-i|--include-directory] [] -[-m|--max-count] -[-n|--name] [] -[ --no-recurse] -[-o|--output] [] -[ --paths] -[ --paths-from] -[ --progress] -[-p|--properties] -[-s|--sort] -[ --target] -[-v|--verbosity] +orang copy + --after-context + --align-columns + --ask +-a, --attributes +-A, --attributes-to-skip + --before-context + --compare + --conflict +-c, --content [] + --content-mode + --context + --count +-d, --dry-run + --encoding +-e, --extension EXT1[,EXT2] [] + --flat +-h, --help +-t, --highlight +-i, --include-directory [] + --line-number +-m, --max-count + --max-matches-in-file + --max-matching-files +-n, --name [] +-C, --no-content +-P, --no-path + --no-recurse +-o, --output [] + --path-mode + --paths + --paths-from + --progress +-p, --properties +-s, --sort +-u, --summary + --target +-v, --verbosity ``` ## Arguments @@ -43,125 +55,173 @@ Path to one or more source directories and optionally a target directory\. ## Options -##### `[--ask]` +##### `--after-context ` + +Number of lines to show after matching line\. + +##### `--align-columns` + +Align columns\. + +##### `--ask` Ask for a permission to copy file or directory\. -##### `[-a|--attributes] ` +##### `-a, --attributes ` File attributes that are required\. [\](OptionValues.md#attributes): `archive`, `compressed`, `d[irectory]`, `e[mpty]`, `encrypted`, `f[ile]`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[-b|--attributes-to-skip] ` +##### `-A, --attributes-to-skip ` File attributes that should be skipped\. [\](OptionValues.md#attributes): `archive`, `compressed`, `e[mpty]`, `encrypted`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[--compare] ` +##### `--before-context ` + +Number of lines to show before matching line\. + +##### `--compare ` File properties to be compared\. [\](OptionValues.md#compare_options): `n[one]`, `a[ttributes]`, `c[ontent]`, `m[odified-]t[ime]`, `s[ize]`\. -##### `[--conflict] ` +##### `--conflict ` Defines how to resolve conflict when a file/directory already exists\. [\](OptionValues.md#conflict_resolution): `a[sk]`, `o[verwrite]`, `suffix`, `s[kip]`\. -##### `[-c|--content] []` +##### `-c, --content []` Regular expression for files' content\. [\](OptionValues.md#pattern_options): `compiled`, `c[ulture-]i[nvariant]`, `e[cma-]s[cript]`, `e[nds-]w[ith]`, `e[quals]`, `n [explicit-capture]`, `f[rom-file]`, `g[roup]=`, `i[gnore-case]`, `x [ignore-pattern-whitespace]`, `li[st]`, `length=`, `l[ist-]s[eparator]`, `l[iteral]`, `m[ultiline]`, `ne[gative]`, `r[ight-to-left]`, `s[ingleline]`, `s[tarts-]w[ith]`, `timeout=`, `w[hole-]l[ine]`, `w[hole-word]`\. -##### `[-y|--display] ` +##### `--content-mode ` -Display of the results\. +Defines which parts of a content should be included in the results\. -[\](OptionValues.md#display_options): `c[ontent]=`[\](OptionValues.md#content_display), `co[ntext]=`, `b [context-before]=`, `a [context-after]=`, `c[ount]`, `c[reation-]t[ime]`, `indent=`, `l[ine-number]`, `m[odified-]t[ime]`, `no-align`, `p[ath]=`[\](OptionValues.md#path_display), `s[ize]`, `s[eparator]=`, `su[mmary]`, `trim-line`\. +[\](OptionValues.md#content_mode): `a[ll-lines]`, `l[ine]`, `u[nmatched-lines]`, `v[alue]`, `d [value-detail]`, `o[mit]`\. -##### `[-d|--dry-run]` +##### `--context ` + +Number of lines to show before and after matching line\. + +##### `--count` + +Show number of matches in a file\. + +##### `-d, --dry-run` Display which files/directories should be copied but do not actually copy any file/directory\. -##### `[--encoding] ` +##### `--encoding ` Encoding to use when a file does not contain BOM\. Default encoding is UTF\-8\. -##### `[-e|--extension] EXT1[,EXT2] []` +##### `-e, --extension EXT1[,EXT2] []` A filter for file extensions \(case\-insensitive by default\)\. [\](OptionValues.md#extension_options): `c[ase-]s[ensitive]`, `c[ulture-]i[nvariant]`, `f[rom-file]`, `l[ist-]s[eparator]`, `l[iteral]`, `ne[gative]`, `timeout=`\. -##### `[--flat]` +##### `--flat` Copy files directly into target directory\. -##### `[-h|--help]` +##### `-h, --help` Show command line help\. -##### `[-t|--highlight] ` +##### `-t, --highlight ` Parts of the output to highlight\. [\](OptionValues.md#highlight): `n[one]`, `m[atch]`, `e[mpty-]m[atch]`, `e[mpty]`, `b[oundary]`, `t[ab]`, `c[arriage-]r[eturn]`, `l[ine]f[eed]`, `newline`, `space`\. -##### `[-i|--include-directory] []` +##### `-i, --include-directory []` Regular expression for a directory name\. -##### `[-m|--max-count] ` +##### `--line-number` + +Include line number\. + +##### `-m, --max-count ` Stop searching after specified number is reached\. -[\](OptionValues.md#max_options): ``, `m[atches]=`\. +##### `--max-matches-in-file ` -##### `[-n|--name] []` +Stop searching in a file after specified number of matches is found\. + +##### `--max-matching-files ` + +Stop searching after specified number of files is found\. + +##### `-n, --name []` Regular expression for file or directory name\. -##### `[--no-recurse]` +##### `-C, --no-content` + +A shortcut for '\-\-content\-mode omit'\. + +##### `-P, --no-path` + +A shortcut for '\-\-path\-mode omit'\. + +##### `--no-recurse` Do not search subdirectories\. -##### `[-o|--output] []` +##### `-o, --output []` Path to a file that should store output\. -##### `[--paths] ` +##### `--path-mode ` + +Defines which part of a path should be included in the results\. + +[\](OptionValues.md#path_mode): `f[ull]`, `r[elative]`, `m[atch]`, `o[mit]`\. + +##### `--paths ` Path to one or more files and/or directories that should be searched\. -##### `[--paths-from] ` +##### `--paths-from ` Read the list of paths to search from a file\. Paths should be separated by newlines\. -##### `[--progress]` +##### `--progress` Display dot \(\.\) for every hundredth searched file or directory\. -##### `[-p|--properties] ` +##### `-p, --properties ` -A filter for file properties\. +Display file's properties and optionally filter by that properties\. -[\](OptionValues.md#file_properties): `c[reation-]t[ime]`, `m[odified-]t[ime]`, `s[ize]=`\. +[\](OptionValues.md#file_properties): `c[reation-]t[ime][=]`, `m[odified-]t[ime][=]`, `s[ize][=]`\. -##### `[-s|--sort] ` +##### `-s, --sort ` Sort matched files and directories\. [\](OptionValues.md#sort_options): `a[scending]`, `c[reation-]t[ime]`, `ci [culture-invariant]`, `d[escending]`, `m[ax-count]=`, `m[odified-]t[ime]`, `n[ame]`, `s[ize]`\. -##### `[--target] ` +##### `-u, --summary` + +Show summary at the end of search\. + +##### `--target ` A directory to copy files and directories to\. It can be also specified as a last unnamed parameter\. -##### `[-v|--verbosity] ` +##### `-v, --verbosity ` The amount of information to display in the log\. diff --git a/docs/cli/delete-command.md b/docs/cli/delete-command.md index 89df679e..ec1bde17 100644 --- a/docs/cli/delete-command.md +++ b/docs/cli/delete-command.md @@ -7,30 +7,40 @@ Deletes files and directories\. ## Synopsis ``` -orang delete [] -[ --ask] -[-a|--attributes] -[-b|--attributes-to-skip] -[-c|--content] [] -[ --content-only] -[-y|--display] -[-d|--dry-run] -[ --encoding] -[-e|--extension] EXT1[,EXT2] [] -[-h|--help] -[-t|--highlight] -[-i|--include-directory] [] -[ --including-bom] -[-m|--max-count] -[-n|--name] [] -[ --no-recurse] -[-o|--output] [] -[ --paths] -[ --paths-from] -[ --progress] -[-p|--properties] -[-s|--sort] -[-v|--verbosity] +orang delete + --after-context + --align-columns + --ask +-a, --attributes +-A, --attributes-to-skip + --before-context +-c, --content [] + --content-mode + --content-only + --context + --count +-d, --dry-run + --encoding +-e, --extension EXT1[,EXT2] [] +-h, --help +-t, --highlight +-i, --include-directory [] + --including-bom + --line-number +-m, --max-count +-n, --name [] +-C, --no-content +-P, --no-path + --no-recurse +-o, --output [] + --path-mode + --paths + --paths-from + --progress +-p, --properties +-s, --sort +-u, --summary +-v, --verbosity ``` ## Arguments @@ -41,111 +51,153 @@ Path to one or more files and/or directories that should be searched\. ## Options -##### `[--ask]` +##### `--after-context ` + +Number of lines to show after matching line\. + +##### `--align-columns` + +Align columns\. + +##### `--ask` Ask for a permission to delete file or directory\. -##### `[-a|--attributes] ` +##### `-a, --attributes ` File attributes that are required\. [\](OptionValues.md#attributes): `archive`, `compressed`, `d[irectory]`, `e[mpty]`, `encrypted`, `f[ile]`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[-b|--attributes-to-skip] ` +##### `-A, --attributes-to-skip ` File attributes that should be skipped\. [\](OptionValues.md#attributes): `archive`, `compressed`, `e[mpty]`, `encrypted`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[-c|--content] []` +##### `--before-context ` + +Number of lines to show before matching line\. + +##### `-c, --content []` Regular expression for files' content\. [\](OptionValues.md#pattern_options): `compiled`, `c[ulture-]i[nvariant]`, `e[cma-]s[cript]`, `e[nds-]w[ith]`, `e[quals]`, `n [explicit-capture]`, `f[rom-file]`, `g[roup]=`, `i[gnore-case]`, `x [ignore-pattern-whitespace]`, `li[st]`, `length=`, `l[ist-]s[eparator]`, `l[iteral]`, `m[ultiline]`, `ne[gative]`, `r[ight-to-left]`, `s[ingleline]`, `s[tarts-]w[ith]`, `timeout=`, `w[hole-]l[ine]`, `w[hole-word]`\. -##### `[--content-only]` +##### `--content-mode ` + +Defines which parts of a content should be included in the results\. + +[\](OptionValues.md#content_mode): `a[ll-lines]`, `l[ine]`, `u[nmatched-lines]`, `v[alue]`, `d [value-detail]`, `o[mit]`\. + +##### `--content-only` Delete content of a file or directory but not the file or directory itself\. -##### `[-y|--display] ` +##### `--context ` -Display of the results\. +Number of lines to show before and after matching line\. -[\](OptionValues.md#display_options): `c[reation-]t[ime]`, `indent=`, `m[odified-]t[ime]`, `no-align`, `p[ath]=`[\](OptionValues.md#path_display), `s[ize]`, `s[eparator]=`, `su[mmary]`\. +##### `--count` -##### `[-d|--dry-run]` +Show number of matches in a file\. + +##### `-d, --dry-run` Display which files/directories should be deleted but do not actually delete any file/directory\. -##### `[--encoding] ` +##### `--encoding ` Encoding to use when a file does not contain BOM\. Default encoding is UTF\-8\. -##### `[-e|--extension] EXT1[,EXT2] []` +##### `-e, --extension EXT1[,EXT2] []` A filter for file extensions \(case\-insensitive by default\)\. [\](OptionValues.md#extension_options): `c[ase-]s[ensitive]`, `c[ulture-]i[nvariant]`, `f[rom-file]`, `l[ist-]s[eparator]`, `l[iteral]`, `ne[gative]`, `timeout=`\. -##### `[-h|--help]` +##### `-h, --help` Show command line help\. -##### `[-t|--highlight] ` +##### `-t, --highlight ` Parts of the output to highlight\. [\](OptionValues.md#highlight): `n[one]`, `m[atch]`, `e[mpty]`\. -##### `[-i|--include-directory] []` +##### `-i, --include-directory []` Regular expression for a directory name\. -##### `[--including-bom]` +##### `--including-bom` Delete byte order mark \(BOM\) when deleting file's content\. -##### `[-m|--max-count] ` +##### `--line-number` + +Include line number\. + +##### `-m, --max-count ` Stop deleting after specified number is reached\. -##### `[-n|--name] []` +##### `-n, --name []` Regular expression for file or directory name\. -##### `[--no-recurse]` +##### `-C, --no-content` + +A shortcut for '\-\-content\-mode omit'\. + +##### `-P, --no-path` + +A shortcut for '\-\-path\-mode omit'\. + +##### `--no-recurse` Do not search subdirectories\. -##### `[-o|--output] []` +##### `-o, --output []` Path to a file that should store output\. -##### `[--paths] ` +##### `--path-mode ` + +Defines which part of a path should be included in the results\. + +[\](OptionValues.md#path_mode): `f[ull]`, `r[elative]`, `m[atch]`, `o[mit]`\. + +##### `--paths ` Path to one or more files and/or directories that should be searched\. -##### `[--paths-from] ` +##### `--paths-from ` Read the list of paths to search from a file\. Paths should be separated by newlines\. -##### `[--progress]` +##### `--progress` Display dot \(\.\) for every hundredth searched file or directory\. -##### `[-p|--properties] ` +##### `-p, --properties ` -A filter for file properties\. +Display file's properties and optionally filter by that properties\. -[\](OptionValues.md#file_properties): `c[reation-]t[ime]`, `m[odified-]t[ime]`, `s[ize]=`\. +[\](OptionValues.md#file_properties): `c[reation-]t[ime][=]`, `m[odified-]t[ime][=]`, `s[ize][=]`\. -##### `[-s|--sort] ` +##### `-s, --sort ` Sort matched files and directories\. [\](OptionValues.md#sort_options): `a[scending]`, `c[reation-]t[ime]`, `ci [culture-invariant]`, `d[escending]`, `m[ax-count]=`, `m[odified-]t[ime]`, `n[ame]`, `s[ize]`\. -##### `[-v|--verbosity] ` +##### `-u, --summary` + +Show summary at the end of search\. + +##### `-v, --verbosity ` The amount of information to display in the log\. diff --git a/docs/cli/find-command.md b/docs/cli/find-command.md index f0b950a9..49d9bd65 100644 --- a/docs/cli/find-command.md +++ b/docs/cli/find-command.md @@ -7,30 +7,42 @@ Searches the file system for files and directories and optionally searches files ## Synopsis ``` -orang find [] -[ --ask] -[-a|--attributes] -[-b|--attributes-to-skip] -[-c|--content] [] -[-y|--display] -[ --encoding] -[-e|--extension] EXT1[,EXT2] [] -[-h|--help] -[-t|--highlight] -[-i|--include-directory] [] -[-m|--max-count] -[ --modify] -[-n|--name] [] -[ --no-recurse] -[-o|--output] [] -[ --paths] -[ --paths-from] -[ --pipe] -[ --progress] -[-p|--properties] -[-s|--sort] -[ --split] -[-v|--verbosity] +orang find + --after-context + --align-columns + --ask +-a, --attributes +-A, --attributes-to-skip + --before-context +-c, --content [] + --content-mode + --context + --count + --encoding +-e, --extension EXT1[,EXT2] [] +-h, --help +-t, --highlight +-i, --include-directory [] + --line-number +-m, --max-count + --max-matches-in-file + --max-matching-files + --modify +-n, --name [] +-C, --no-content +-P, --no-path + --no-recurse +-o, --output [] + --path-mode + --paths + --paths-from + --pipe + --progress +-p, --properties +-s, --sort + --split +-u, --summary +-v, --verbosity ``` ## Arguments @@ -41,119 +53,167 @@ Path to one or more files and/or directories that should be searched\. ## Options -##### `[--ask] ` +##### `--after-context ` + +Number of lines to show after matching line\. + +##### `--align-columns` + +Align columns\. + +##### `--ask ` Ask for permission after each file or value\. [\](OptionValues.md#ask_mode): `f[ile]`, `v[alue]`\. -##### `[-a|--attributes] ` +##### `-a, --attributes ` File attributes that are required\. [\](OptionValues.md#attributes): `archive`, `compressed`, `d[irectory]`, `e[mpty]`, `encrypted`, `f[ile]`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[-b|--attributes-to-skip] ` +##### `-A, --attributes-to-skip ` File attributes that should be skipped\. [\](OptionValues.md#attributes): `archive`, `compressed`, `e[mpty]`, `encrypted`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[-c|--content] []` +##### `--before-context ` + +Number of lines to show before matching line\. + +##### `-c, --content []` Regular expression for files' content\. [\](OptionValues.md#pattern_options): `compiled`, `c[ulture-]i[nvariant]`, `e[cma-]s[cript]`, `e[nds-]w[ith]`, `e[quals]`, `n [explicit-capture]`, `f[rom-file]`, `g[roup]=`, `i[gnore-case]`, `x [ignore-pattern-whitespace]`, `li[st]`, `length=`, `l[ist-]s[eparator]`, `l[iteral]`, `m[ultiline]`, `ne[gative]`, `r[ight-to-left]`, `s[ingleline]`, `s[tarts-]w[ith]`, `timeout=`, `w[hole-]l[ine]`, `w[hole-word]`\. -##### `[-y|--display] ` +##### `--content-mode ` -Display of the results\. +Defines which parts of a content should be included in the results\. -[\](OptionValues.md#display_options): `c[ontent]=`[\](OptionValues.md#content_display), `co[ntext]=`, `b [context-before]=`, `a [context-after]=`, `c[ount]`, `c[reation-]t[ime]`, `indent=`, `l[ine-number]`, `m[odified-]t[ime]`, `no-align`, `p[ath]=`[\](OptionValues.md#path_display), `s[ize]`, `s[eparator]=`, `su[mmary]`, `trim-line`\. +[\](OptionValues.md#content_mode): `a[ll-lines]`, `l[ine]`, `u[nmatched-lines]`, `v[alue]`, `d [value-detail]`, `o[mit]`\. -##### `[--encoding] ` +##### `--context ` + +Number of lines to show before and after matching line\. + +##### `--count` + +Show number of matches in a file\. + +##### `--encoding ` Encoding to use when a file does not contain BOM\. Default encoding is UTF\-8\. -##### `[-e|--extension] EXT1[,EXT2] []` +##### `-e, --extension EXT1[,EXT2] []` A filter for file extensions \(case\-insensitive by default\)\. [\](OptionValues.md#extension_options): `c[ase-]s[ensitive]`, `c[ulture-]i[nvariant]`, `f[rom-file]`, `l[ist-]s[eparator]`, `l[iteral]`, `ne[gative]`, `timeout=`\. -##### `[-h|--help]` +##### `-h, --help` Show command line help\. -##### `[-t|--highlight] ` +##### `-t, --highlight ` Parts of the output to highlight\. [\](OptionValues.md#highlight): `n[one]`, `m[atch]`, `e[mpty-]m[atch]`, `e[mpty]`, `b[oundary]`, `t[ab]`, `c[arriage-]r[eturn]`, `l[ine]f[eed]`, `newline`, `space`\. -##### `[-i|--include-directory] []` +##### `-i, --include-directory []` Regular expression for a directory name\. -##### `[-m|--max-count] ` +##### `--line-number` + +Include line number\. + +##### `-m, --max-count ` Stop searching after specified number is reached\. -[\](OptionValues.md#max_options): ``, `m[atches]=`\. +##### `--max-matches-in-file ` -##### `[--modify] ` +Stop searching in a file after specified number of matches is found\. + +##### `--max-matching-files ` + +Stop searching after specified number of files is found\. + +##### `--modify ` Functions to modify results\. -[\](OptionValues.md#modify_options): `ag[gregate]`, `o [aggregate-only]`, `a[scending]`, `ci [culture-invariant]`, `d[escending]`, `di[stinct]`, `except`, `intersect`, `group`, `i[gnore-case]`, `re[move-empty]`, `rw [remove-white-space]`, `sort-by=`[\](OptionValues.md#sort_property), `tl [to-lower]`, `tu [to-upper]`, `t[rim]`, `te [trim-end]`, `ts [trim-start]`\. +[\](OptionValues.md#modify_options): `ag[gregate]`, `o [aggregate-only]`, `a[scending]`, `ci [culture-invariant]`, `d[escending]`, `di[stinct]`, `except`, `intersect`, `group`, `count`, `i[gnore-case]`, `re[move-empty]`, `rw [remove-white-space]`, `sort-by=`[\](OptionValues.md#sort_property), `tl [to-lower]`, `tu [to-upper]`, `t[rim]`, `te [trim-end]`, `ts [trim-start]`\. -##### `[-n|--name] []` +##### `-n, --name []` Regular expression for file or directory name\. -##### `[--no-recurse]` +##### `-C, --no-content` + +A shortcut for '\-\-content\-mode omit'\. + +##### `-P, --no-path` + +A shortcut for '\-\-path\-mode omit'\. + +##### `--no-recurse` Do not search subdirectories\. -##### `[-o|--output] []` +##### `-o, --output []` Path to a file that should store output\. -##### `[--paths] ` +##### `--path-mode ` + +Defines which part of a path should be included in the results\. + +[\](OptionValues.md#path_mode): `f[ull]`, `r[elative]`, `m[atch]`, `o[mit]`\. + +##### `--paths ` Path to one or more files and/or directories that should be searched\. -##### `[--paths-from] ` +##### `--paths-from ` Read the list of paths to search from a file\. Paths should be separated by newlines\. -##### `[--pipe] ` +##### `--pipe ` Defines how to use redirected/piped input\. [\](OptionValues.md#pipe_mode): `t[ext]`, `p[aths]`\. -##### `[--progress]` +##### `--progress` Display dot \(\.\) for every hundredth searched file or directory\. -##### `[-p|--properties] ` +##### `-p, --properties ` -A filter for file properties\. +Display file's properties and optionally filter by that properties\. -[\](OptionValues.md#file_properties): `c[reation-]t[ime]`, `m[odified-]t[ime]`, `s[ize]=`\. +[\](OptionValues.md#file_properties): `c[reation-]t[ime][=]`, `m[odified-]t[ime][=]`, `s[ize][=]`\. -##### `[-s|--sort] ` +##### `-s, --sort ` Sort matched files and directories\. [\](OptionValues.md#sort_options): `a[scending]`, `c[reation-]t[ime]`, `ci [culture-invariant]`, `d[escending]`, `m[ax-count]=`, `m[odified-]t[ime]`, `n[ame]`, `s[ize]`\. -##### `[--split]` +##### `--split` Execute regex in a split mode\. -##### `[-v|--verbosity] ` +##### `-u, --summary` + +Show summary at the end of search\. + +##### `-v, --verbosity ` The amount of information to display in the log\. diff --git a/docs/cli/help-command.md b/docs/cli/help-command.md index a0d4a1af..ebc34e7b 100644 --- a/docs/cli/help-command.md +++ b/docs/cli/help-command.md @@ -7,12 +7,12 @@ Displays help\. ## Synopsis ``` -orang help [] -[-f|--filter] [] -[-h|--help] -[-m|--manual] -[-o|--online] -[-v|--verbosity] +orang help +-f, --filter [] +-h, --help +-m, --manual +-o, --online +-v, --verbosity ``` ## Arguments @@ -23,25 +23,25 @@ Command name\. ## Options -##### `[-f|--filter] []` +##### `-f, --filter []` Regular expression to filter results\. [PatternOptions_List](OptionValues.md#patternoptions_list): `c[ase-]s[ensitive]`, `compiled`, `c[ulture-]i[nvariant]`, `e[cma-]s[cript]`, `n [explicit-capture]`, `f[rom-file]`, `g[roup]=`, `x [ignore-pattern-whitespace]`, `li[st]`, `l[ist-]s[eparator]`, `l[iteral]`, `m[ultiline]`, `ne[gative]`, `r[ight-to-left]`, `s[ingleline]`, `timeout=`, `w[hole-]l[ine]`\. -##### `[-h|--help]` +##### `-h, --help` Show command line help\. -##### `[-m|--manual]` +##### `-m, --manual` Display full manual\. -##### `[-o|--online]` +##### `-o, --online` Launch online help in a default browser\. -##### `[-v|--verbosity] ` +##### `-v, --verbosity ` The amount of information to display in the log\. diff --git a/docs/cli/manual.txt b/docs/cli/manual.txt index 87e2033a..f82660af 100644 --- a/docs/cli/manual.txt +++ b/docs/cli/manual.txt @@ -1,26 +1,26 @@ -Orang Command-Line Tool version 0.2.2.0 +Orang Command-Line Tool version 0.3.0.0 Usage: orang [command] [arguments] Main commands: - find Searches the file system for files and directories and optionally searches files' content. - replace Searches the file system for files and replaces its content. + find Searches the file system for files and directories and optionally searches files' content. + replace Searches the file system for files and replaces its content. File System commands: - copy Searches the file system for files and directories and copy them to a destination directory. - delete Deletes files and directories. - move Searches the file system for files and directories and move them to a destination directory. - rename Renames files and directories. - spellcheck Searches the files' content for potential misspellings and typos. - sync Synchronizes content of two directories. + copy Searches the file system for files and directories and copy them to a destination directory. + delete Deletes files and directories. + move Searches the file system for files and directories and move them to a destination directory. + rename Renames files and directories. + spellcheck Searches the files' content for potential misspellings and typos. + sync Synchronizes content of two directories. Regex commands: - escape Escapes special characters by replacing them with their escape codes. - list-patterns Lists regular expression patterns. - match Searches the input string for occurrences of the regular expression. - split Splits the input string into an list of substrings at the positions defined by a regular expression. + regex escape Escapes special characters by replacing them with their escape codes. + regex list Lists regular expression patterns. + regex match Searches the input string for occurrences of the regular expression. + regex split Splits the input string into an list of substrings at the positions defined by a regular expression. Other commands: - help Displays help. + help Displays help. ---------- @@ -31,34 +31,47 @@ Searches the file system for files and directories and copy them to a destinatio Usage: orang copy [] [options] Arguments: - [] Path to one or more source directories and optionally a target directory. + Path to one or more source directories and optionally a target directory. Options: - [ --ask] Ask for a permission to copy file or directory. - [-a, --attributes] File attributes that are required. - [-b, --attributes-to-skip] File attributes that should be skipped. - [ --compare] File properties to be compared. - [ --conflict] Defines how to resolve conflict when a file/directory already exists. - [-c, --content] [] Regular expression for files' content. - [-y, --display] Display of the results. - [-d, --dry-run] Display which files/directories should be copied but do not actually copy any file/directory. - [ --encoding] Encoding to use when a file does not contain BOM. Default encoding is UTF-8. - [-e, --extension] EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). - [ --flat] Copy files directly into target directory. - [-h, --help] Show command line help. - [-t, --highlight] Parts of the output to highlight. - [-i, --include-directory] [] Regular expression for a directory name. - [-m, --max-count] Stop searching after specified number is reached. - [-n, --name] [] Regular expression for file or directory name. - [ --no-recurse] Do not search subdirectories. - [-o, --output] [] Path to a file that should store output. - [ --paths] Path to one or more files and/or directories that should be searched. - [ --paths-from] Read the list of paths to search from a file. Paths should be separated by newlines. - [ --progress] Display dot (.) for every hundredth searched file or directory. - [-p, --properties] A filter for file properties. - [-s, --sort] Sort matched files and directories. - [ --target] A directory to copy files and directories to. It can be also specified as a last unnamed parameter. - [-v, --verbosity] The amount of information to display in the log. + --after-context Number of lines to show after matching line. + --align-columns Align columns. + --ask Ask for a permission to copy file or directory. + -a, --attributes File attributes that are required. + -A, --attributes-to-skip File attributes that should be skipped. + --before-context Number of lines to show before matching line. + --compare File properties to be compared. + --conflict Defines how to resolve conflict when a file/directory already exists. + -c, --content [] Regular expression for files' content. + --content-mode Defines which parts of a content should be included in the results. + --context Number of lines to show before and after matching line. + --count Show number of matches in a file. + -y, --display Display of the results. + -d, --dry-run Display which files/directories should be copied but do not actually copy any file/directory. + --encoding Encoding to use when a file does not contain BOM. Default encoding is UTF-8. + -e, --extension EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). + --flat Copy files directly into target directory. + -h, --help Show command line help. + -t, --highlight Parts of the output to highlight. + -i, --include-directory [] Regular expression for a directory name. + --line-number Include line number. + -m, --max-count Stop searching after specified number is reached. + --max-matches-in-file Stop searching in a file after specified number of matches is found. + --max-matching-files Stop searching after specified number of files is found. + -n, --name [] Regular expression for file or directory name. + -C, --no-content A shortcut for '--content-mode omit'. + -P, --no-path A shortcut for '--path-mode omit'. + --no-recurse Do not search subdirectories. + -o, --output [] Path to a file that should store output. + --path-mode Defines which part of a path should be included in the results. + --paths Path to one or more files and/or directories that should be searched. + --paths-from Read the list of paths to search from a file. Paths should be separated by newlines. + --progress Display dot (.) for every hundredth searched file or directory. + -p, --properties Display file's properties and optionally filter by that properties. + -s, --sort Sort matched files and directories. + -u, --summary Show summary at the end of search. + --target A directory to copy files and directories to. It can be also specified as a last unnamed parameter. + -v, --verbosity The amount of information to display in the log. ---------- @@ -69,181 +82,245 @@ Deletes files and directories. Usage: orang delete [] [options] Arguments: - [] Path to one or more files and/or directories that should be searched. + Path to one or more files and/or directories that should be searched. Options: - [ --ask] Ask for a permission to delete file or directory. - [-a, --attributes] File attributes that are required. - [-b, --attributes-to-skip] File attributes that should be skipped. - [-c, --content] [] Regular expression for files' content. - [ --content-only] Delete content of a file or directory but not the file or directory itself. - [-y, --display] Display of the results. - [-d, --dry-run] Display which files/directories should be deleted but do not actually delete any file/directory. - [ --encoding] Encoding to use when a file does not contain BOM. Default encoding is UTF-8. - [-e, --extension] EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). - [-h, --help] Show command line help. - [-t, --highlight] Parts of the output to highlight. - [-i, --include-directory] [] Regular expression for a directory name. - [ --including-bom] Delete byte order mark (BOM) when deleting file's content. - [-m, --max-count] Stop deleting after specified number is reached. - [-n, --name] [] Regular expression for file or directory name. - [ --no-recurse] Do not search subdirectories. - [-o, --output] [] Path to a file that should store output. - [ --paths] Path to one or more files and/or directories that should be searched. - [ --paths-from] Read the list of paths to search from a file. Paths should be separated by newlines. - [ --progress] Display dot (.) for every hundredth searched file or directory. - [-p, --properties] A filter for file properties. - [-s, --sort] Sort matched files and directories. - [-v, --verbosity] The amount of information to display in the log. + --after-context Number of lines to show after matching line. + --align-columns Align columns. + --ask Ask for a permission to delete file or directory. + -a, --attributes File attributes that are required. + -A, --attributes-to-skip File attributes that should be skipped. + --before-context Number of lines to show before matching line. + -c, --content [] Regular expression for files' content. + --content-mode Defines which parts of a content should be included in the results. + --content-only Delete content of a file or directory but not the file or directory itself. + --context Number of lines to show before and after matching line. + --count Show number of matches in a file. + -y, --display Display of the results. + -d, --dry-run Display which files/directories should be deleted but do not actually delete any file/directory. + --encoding Encoding to use when a file does not contain BOM. Default encoding is UTF-8. + -e, --extension EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). + -h, --help Show command line help. + -t, --highlight Parts of the output to highlight. + -i, --include-directory [] Regular expression for a directory name. + --including-bom Delete byte order mark (BOM) when deleting file's content. + --line-number Include line number. + -m, --max-count Stop deleting after specified number is reached. + -n, --name [] Regular expression for file or directory name. + -C, --no-content A shortcut for '--content-mode omit'. + -P, --no-path A shortcut for '--path-mode omit'. + --no-recurse Do not search subdirectories. + -o, --output [] Path to a file that should store output. + --path-mode Defines which part of a path should be included in the results. + --paths Path to one or more files and/or directories that should be searched. + --paths-from Read the list of paths to search from a file. Paths should be separated by newlines. + --progress Display dot (.) for every hundredth searched file or directory. + -p, --properties Display file's properties and optionally filter by that properties. + -s, --sort Sort matched files and directories. + -u, --summary Show summary at the end of search. + -v, --verbosity The amount of information to display in the log. ---------- -Command: escape +Command: find -Escapes special characters by replacing them with their escape codes. +Searches the file system for files and directories and optionally searches files' content. -Usage: orang escape [options] +Usage: orang find [] [options] + +Arguments: + Path to one or more files and/or directories that should be searched. Options: - [ --char-group] Text is part of a character group. - [-h, --help] Show command line help. - [-i, --input] [] Text to be escaped. - [-o, --output] [] Path to a file that should store output. - [-r, --replacement] Text is a replacement string. - [-v, --verbosity] The amount of information to display in the log. + --after-context Number of lines to show after matching line. + --align-columns Align columns. + --ask Ask for permission after each file or value. + -a, --attributes File attributes that are required. + -A, --attributes-to-skip File attributes that should be skipped. + --before-context Number of lines to show before matching line. + -c, --content [] Regular expression for files' content. + --content-mode Defines which parts of a content should be included in the results. + --context Number of lines to show before and after matching line. + --count Show number of matches in a file. + -y, --display Display of the results. + --encoding Encoding to use when a file does not contain BOM. Default encoding is UTF-8. + -e, --extension EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). + -h, --help Show command line help. + -t, --highlight Parts of the output to highlight. + -i, --include-directory [] Regular expression for a directory name. + --line-number Include line number. + -m, --max-count Stop searching after specified number is reached. + --max-matches-in-file Stop searching in a file after specified number of matches is found. + --max-matching-files Stop searching after specified number of files is found. + --modify Functions to modify results. + -n, --name [] Regular expression for file or directory name. + -C, --no-content A shortcut for '--content-mode omit'. + -P, --no-path A shortcut for '--path-mode omit'. + --no-recurse Do not search subdirectories. + -o, --output [] Path to a file that should store output. + --path-mode Defines which part of a path should be included in the results. + --paths Path to one or more files and/or directories that should be searched. + --paths-from Read the list of paths to search from a file. Paths should be separated by newlines. + --pipe Defines how to use redirected/piped input. + --progress Display dot (.) for every hundredth searched file or directory. + -p, --properties Display file's properties and optionally filter by that properties. + -s, --sort Sort matched files and directories. + --split Execute regex in a split mode. + -u, --summary Show summary at the end of search. + -v, --verbosity The amount of information to display in the log. ---------- -Command: find +Command: help -Searches the file system for files and directories and optionally searches files' content. +Displays help. -Usage: orang find [] [options] +Usage: orang help [] [options] Arguments: - [] Path to one or more files and/or directories that should be searched. + Command name. Options: - [ --ask] Ask for permission after each file or value. - [-a, --attributes] File attributes that are required. - [-b, --attributes-to-skip] File attributes that should be skipped. - [-c, --content] [] Regular expression for files' content. - [-y, --display] Display of the results. - [ --encoding] Encoding to use when a file does not contain BOM. Default encoding is UTF-8. - [-e, --extension] EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). - [-h, --help] Show command line help. - [-t, --highlight] Parts of the output to highlight. - [-i, --include-directory] [] Regular expression for a directory name. - [-m, --max-count] Stop searching after specified number is reached. - [ --modify] Functions to modify results. - [-n, --name] [] Regular expression for file or directory name. - [ --no-recurse] Do not search subdirectories. - [-o, --output] [] Path to a file that should store output. - [ --paths] Path to one or more files and/or directories that should be searched. - [ --paths-from] Read the list of paths to search from a file. Paths should be separated by newlines. - [ --pipe] Defines how to use redirected/piped input. - [ --progress] Display dot (.) for every hundredth searched file or directory. - [-p, --properties] A filter for file properties. - [-s, --sort] Sort matched files and directories. - [ --split] Execute regex in a split mode. - [-v, --verbosity] The amount of information to display in the log. + -f, --filter [] Regular expression to filter results. + -h, --help Show command line help. + -m, --manual Display full manual. + -o, --online Launch online help in a default browser. + -v, --verbosity The amount of information to display in the log. ---------- -Command: help +Command: move -Displays help. +Searches the file system for files and directories and move them to a destination directory. -Usage: orang help [] [options] +Usage: orang move [] [options] Arguments: - [] Command name. + Path to one or more source directories and optionally a target directory. Options: - [-f, --filter] [] Regular expression to filter results. - [-h, --help] Show command line help. - [-m, --manual] Display full manual. - [-o, --online] Launch online help in a default browser. - [-v, --verbosity] The amount of information to display in the log. + --after-context Number of lines to show after matching line. + --align-columns Align columns. + --ask Ask for a permission to move file or directory. + -a, --attributes File attributes that are required. + -A, --attributes-to-skip File attributes that should be skipped. + --before-context Number of lines to show before matching line. + --compare File properties to be compared. + --conflict Defines how to resolve conflict when a file/directory already exists. + -c, --content [] Regular expression for files' content. + --content-mode Defines which parts of a content should be included in the results. + --context Number of lines to show before and after matching line. + --count Show number of matches in a file. + -y, --display Display of the results. + -d, --dry-run Display which files/directories should be moved but do not actually move any file/directory. + --encoding Encoding to use when a file does not contain BOM. Default encoding is UTF-8. + -e, --extension EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). + --flat Move files directly into target directory. + -h, --help Show command line help. + -t, --highlight Parts of the output to highlight. + -i, --include-directory [] Regular expression for a directory name. + --line-number Include line number. + -m, --max-count Stop searching after specified number is reached. + --max-matches-in-file Stop searching in a file after specified number of matches is found. + --max-matching-files Stop searching after specified number of files is found. + -n, --name [] Regular expression for file or directory name. + -C, --no-content A shortcut for '--content-mode omit'. + -P, --no-path A shortcut for '--path-mode omit'. + --no-recurse Do not search subdirectories. + -o, --output [] Path to a file that should store output. + --path-mode Defines which part of a path should be included in the results. + --paths Path to one or more files and/or directories that should be searched. + --paths-from Read the list of paths to search from a file. Paths should be separated by newlines. + --progress Display dot (.) for every hundredth searched file or directory. + -p, --properties Display file's properties and optionally filter by that properties. + -s, --sort Sort matched files and directories. + -u, --summary Show summary at the end of search. + --target A directory to move files and directories to. It can be also specified as a last unnamed parameter. + -v, --verbosity The amount of information to display in the log. ---------- -Command: list-patterns +Command: regex escape + +Escapes special characters by replacing them with their escape codes. + +Usage: orang regex escape [options] + +Options: + --char-group Text is part of a character group. + -h, --help Show command line help. + -i, --input [] Text to be escaped. + -o, --output [] Path to a file that should store output. + -r, --replacement Text is a replacement string. + -v, --verbosity The amount of information to display in the log. + +---------- + +Command: regex list Lists regular expression patterns. -Usage: orang list-patterns [] [options] +Usage: orang regex list [] [options] Arguments: - [] Character or a decimal number that represents the character. For a number literal use escape like \1. + Character or a decimal number that represents the character. For a number literal use escape like \1. Options: - [ --char-group] Treat character as if it is in the character group. - [-f, --filter] [] Regular expression to filter patterns (case-insensitive by default). - [-h, --help] Show command line help. - [-o, --options] Regex options that should be used. Relevant values are ecma-script or ignore-case. - [-s, --section] Syntax sections to filter. - [-v, --verbosity] The amount of information to display in the log. + --char-group Treat character as if it is in the character group. + -f, --filter [] Regular expression to filter patterns (case-insensitive by default). + -h, --help Show command line help. + -o, --options Regex options that should be used. Relevant values are ecma-script or ignore-case. + -s, --section Syntax sections to filter. + -v, --verbosity The amount of information to display in the log. ---------- -Command: match +Command: regex match Searches the input string for occurrences of the regular expression. -Usage: orang match [] [options] +Usage: orang regex match [] [options] Arguments: - [] Path to a file that should be analyzed. + Path to a file that should be analyzed. Options: - -c, --content [] Regular expression for the input string. - [-y, --display] Display of the results. - [-h, --help] Show command line help. - [-t, --highlight] Parts of the output to highlight. - [-i, --input] [] The input string to be searched. - [-m, --max-count] Maximum number of matches returned. - [ --modify] Functions to modify results. - [-o, --output] [] Path to a file that should store output. - [-v, --verbosity] The amount of information to display in the log. + -c, --content [] Regular expression for the input string. + --content-mode Defines which parts of a content should be included in the results. + -y, --display Display of the results. + -h, --help Show command line help. + -t, --highlight Parts of the output to highlight. + -i, --input [] The input string to be searched. + -m, --max-count Maximum number of matches returned. + --modify Functions to modify results. + -o, --output [] Path to a file that should store output. + -u, --summary Show summary at the end of search. + -v, --verbosity The amount of information to display in the log. ---------- -Command: move +Command: regex split -Searches the file system for files and directories and move them to a destination directory. +Splits the input string into an list of substrings at the positions defined by a regular expression. -Usage: orang move [] [options] +Usage: orang regex split [] [options] Arguments: - [] Path to one or more source directories and optionally a target directory. + Path to a file that should be analyzed. Options: - [ --ask] Ask for a permission to move file or directory. - [-a, --attributes] File attributes that are required. - [-b, --attributes-to-skip] File attributes that should be skipped. - [ --compare] File properties to be compared. - [ --conflict] Defines how to resolve conflict when a file/directory already exists. - [-c, --content] [] Regular expression for files' content. - [-y, --display] Display of the results. - [-d, --dry-run] Display which files/directories should be moved but do not actually move any file/directory. - [ --encoding] Encoding to use when a file does not contain BOM. Default encoding is UTF-8. - [-e, --extension] EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). - [ --flat] Move files directly into target directory. - [-h, --help] Show command line help. - [-t, --highlight] Parts of the output to highlight. - [-i, --include-directory] [] Regular expression for a directory name. - [-m, --max-count] Stop searching after specified number is reached. - [-n, --name] [] Regular expression for file or directory name. - [ --no-recurse] Do not search subdirectories. - [-o, --output] [] Path to a file that should store output. - [ --paths] Path to one or more files and/or directories that should be searched. - [ --paths-from] Read the list of paths to search from a file. Paths should be separated by newlines. - [ --progress] Display dot (.) for every hundredth searched file or directory. - [-p, --properties] A filter for file properties. - [-s, --sort] Sort matched files and directories. - [ --target] A directory to move files and directories to. It can be also specified as a last unnamed parameter. - [-v, --verbosity] The amount of information to display in the log. + -c, --content [] Regular expression for the input string. + --content-mode Defines which parts of a content should be included in the results. + -y, --display Display of the results. + -h, --help Show command line help. + -t, --highlight Parts of the output to highlight. + -i, --input [] The input string to be searched. + -m, --max-count Maximum number of times the split can occur. + --modify Functions to modify results. + --no-groups Do not include groups in the results. + -o, --output [] Path to a file that should store output. + -u, --summary Show summary at the end of search. + -v, --verbosity The amount of information to display in the log. ---------- @@ -254,34 +331,47 @@ Renames files and directories. Usage: orang rename [] [options] Arguments: - [] Path to one or more files and/or directories that should be searched. + Path to one or more files and/or directories that should be searched. Options: - [ --ask] Ask for a permission to rename file or directory. - [-a, --attributes] File attributes that are required. - [-b, --attributes-to-skip] File attributes that should be skipped. - [ --conflict] Defines how to resolve conflict when a file/directory already exists. - [-c, --content] [] Regular expression for files' content. - [-y, --display] Display of the results. - [-d, --dry-run] Display which files/directories should be renamed but do not actually rename any file/directory. - [ --encoding] Encoding to use when a file does not contain BOM. Default encoding is UTF-8. - [-e, --extension] EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). - [-h, --help] Show command line help. - [-t, --highlight] Parts of the output to highlight. - [-i, --include-directory] [] Regular expression for a directory name. - [ --interactive] Enable editing of a new name. - [-m, --max-count] Stop renaming after specified number is reached. - [ --modify] Functions to modify result. - -n, --name [] Regular expression for file or directory name. - [ --no-recurse] Do not search subdirectories. - [-o, --output] [] Path to a file that should store output. - [ --paths] Path to one or more files and/or directories that should be searched. - [ --paths-from] Read the list of paths to search from a file. Paths should be separated by newlines. - [ --progress] Display dot (.) for every hundredth searched file or directory. - [-p, --properties] A filter for file properties. - [-r, --replacement] [] Replacement pattern. - [-s, --sort] Sort matched files and directories. - [-v, --verbosity] The amount of information to display in the log. + --after-context Number of lines to show after matching line. + --align-columns Align columns. + --ask Ask for a permission to rename file or directory. + -a, --attributes File attributes that are required. + -A, --attributes-to-skip File attributes that should be skipped. + --before-context Number of lines to show before matching line. + --conflict Defines how to resolve conflict when a file/directory already exists. + -c, --content [] Regular expression for files' content. + --content-mode Defines which parts of a content should be included in the results. + --context Number of lines to show before and after matching line. + --count Show number of matches in a file. + -y, --display Display of the results. + -d, --dry-run Display which files/directories should be renamed but do not actually rename any file/directory. + --encoding Encoding to use when a file does not contain BOM. Default encoding is UTF-8. + --evaluator [deprecated] Use option -r, --replacement instead. + -e, --extension EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). + -h, --help Show command line help. + -t, --highlight Parts of the output to highlight. + -i, --include-directory [] Regular expression for a directory name. + --interactive Enable editing of a new name. + --line-number Include line number. + -m, --max-count Stop renaming after specified number is reached. + --max-matches-in-file Stop searching in a file name after specified number of matches is found. + --modify Functions to modify result. + -n, --name [] Regular expression for file or directory name. + -C, --no-content A shortcut for '--content-mode omit'. + -P, --no-path A shortcut for '--path-mode omit'. + --no-recurse Do not search subdirectories. + -o, --output [] Path to a file that should store output. + --path-mode Defines which part of a path should be included in the results. + --paths Path to one or more files and/or directories that should be searched. + --paths-from Read the list of paths to search from a file. Paths should be separated by newlines. + --progress Display dot (.) for every hundredth searched file or directory. + -p, --properties Display file's properties and optionally filter by that properties. + -r, --replacement [] Replacement pattern. + -s, --sort Sort matched files and directories. + -u, --summary Show summary at the end of search. + -v, --verbosity The amount of information to display in the log. ---------- @@ -292,35 +382,49 @@ Searches the file system for files and replaces its content. Usage: orang replace [] [options] Arguments: - [] Path to one or more files and/or directories that should be searched. + Path to one or more files and/or directories that should be searched. Options: - [ --ask] Ask for permission after each file or value. - [-a, --attributes] File attributes that are required. - [-b, --attributes-to-skip] File attributes that should be skipped. - -c, --content [] Regular expression for files' content. - [-y, --display] Display of the results. - [-d, --dry-run] Display which files should be updated but do not actually update any file. - [ --encoding] Encoding to use when a file does not contain BOM. Default encoding is UTF-8. - [-e, --extension] EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). - [-h, --help] Show command line help. - [-t, --highlight] Parts of the output to highlight. - [-i, --include-directory] [] Regular expression for a directory name. - [ --input] [] The input string to be searched. - [ --interactive] Enable editing of a replacement. - [-m, --max-count] Stop searching after specified number is reached. - [ --modify] Functions to modify result. - [-n, --name] [] Regular expression for file or directory name. - [ --no-recurse] Do not search subdirectories. - [-o, --output] [] Path to a file that should store output. - [ --paths] Path to one or more files and/or directories that should be searched. - [ --paths-from] Read the list of paths to search from a file. Paths should be separated by newlines. - [ --pipe] Defines how to use redirected/piped input. - [ --progress] Display dot (.) for every hundredth searched file or directory. - [-p, --properties] A filter for file properties. - [-r, --replacement] [] Replacement pattern. - [-s, --sort] Sort matched files and directories. - [-v, --verbosity] The amount of information to display in the log. + --after-context Number of lines to show after matching line. + --align-columns Align columns. + --ask Ask for permission after each file or value. + -a, --attributes File attributes that are required. + -A, --attributes-to-skip File attributes that should be skipped. + --before-context Number of lines to show before matching line. + -c, --content [] Regular expression for files' content. + --content-mode Defines which parts of a content should be included in the results. + --context Number of lines to show before and after matching line. + --count Show number of matches in a file. + -y, --display Display of the results. + -d, --dry-run Display which files should be updated but do not actually update any file. + --encoding Encoding to use when a file does not contain BOM. Default encoding is UTF-8. + --evaluator [deprecated] Use option -r, --replacement instead. + -e, --extension EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). + -h, --help Show command line help. + -t, --highlight Parts of the output to highlight. + -i, --include-directory [] Regular expression for a directory name. + --input [] The input string to be searched. + --interactive Enable editing of a replacement. + --line-number Include line number. + -m, --max-count Stop searching after specified number is reached. + --max-matches-in-file Stop searching in a file after specified number of matches is found. + --max-matching-files Stop searching after specified number of files is found. + --modify Functions to modify result. + -n, --name [] Regular expression for file or directory name. + -C, --no-content A shortcut for '--content-mode omit'. + -P, --no-path A shortcut for '--path-mode omit'. + --no-recurse Do not search subdirectories. + -o, --output [] Path to a file that should store output. + --path-mode Defines which part of a path should be included in the results. + --paths Path to one or more files and/or directories that should be searched. + --paths-from Read the list of paths to search from a file. Paths should be separated by newlines. + --pipe Defines how to use redirected/piped input. + --progress Display dot (.) for every hundredth searched file or directory. + -p, --properties Display file's properties and optionally filter by that properties. + -r, --replacement [] Replacement pattern. + -s, --sort Sort matched files and directories. + -u, --summary Show summary at the end of search. + -v, --verbosity The amount of information to display in the log. ---------- @@ -331,59 +435,50 @@ Searches the files' content for potential misspellings and typos. Usage: orang spellcheck [] [options] Arguments: - [] Path to one or more files and/or directories that should be searched. - -Options: - [ --ask] Ask for permission after each file or value. - [-a, --attributes] File attributes that are required. - [-b, --attributes-to-skip] File attributes that should be skipped. - [ --case-sensitive] Specifies case-sensitive matching. - [-c, --content] [] Regular expression for files' content. - [-y, --display] Display of the results. - [-d, --dry-run] Display which files should be updated but do not actually update any file. - [ --encoding] Encoding to use when a file does not contain BOM. Default encoding is UTF-8. - [-e, --extension] EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). - [-h, --help] Show command line help. - [-t, --highlight] Parts of the output to highlight. - [-i, --include-directory] [] Regular expression for a directory name. - [ --input] [] The input string to be searched. - [ --interactive] Enable editing of a replacement. - [-m, --max-count] Stop searching after specified number is reached. - [ --min-word-length] Specifies minimal word length to be checked. Default value is 3. - [-n, --name] [] Regular expression for file or directory name. - [ --no-recurse] Do not search subdirectories. - [-o, --output] [] Path to a file that should store output. - [ --paths] Path to one or more files and/or directories that should be searched. - [ --paths-from] Read the list of paths to search from a file. Paths should be separated by newlines. - [ --pipe] Defines how to use redirected/piped input. - [ --progress] Display dot (.) for every hundredth searched file or directory. - [-p, --properties] A filter for file properties. - [-s, --sort] Sort matched files and directories. - [-v, --verbosity] The amount of information to display in the log. - --words Specified path to file and/or directory that contains list of allowed words. - ----------- - -Command: split - -Splits the input string into an list of substrings at the positions defined by a regular expression. - -Usage: orang split [] [options] - -Arguments: - [] Path to a file that should be analyzed. + Path to one or more files and/or directories that should be searched. Options: - -c, --content [] Regular expression for the input string. - [-y, --display] Display of the results. - [-h, --help] Show command line help. - [-t, --highlight] Parts of the output to highlight. - [-i, --input] [] The input string to be searched. - [-m, --max-count] Maximum number of times the split can occur. - [ --modify] Functions to modify results. - [ --no-groups] Do not include groups in the results. - [-o, --output] [] Path to a file that should store output. - [-v, --verbosity] The amount of information to display in the log. + --after-context Number of lines to show after matching line. + --align-columns Align columns. + --ask Ask for permission after each file or value. + -a, --attributes File attributes that are required. + -A, --attributes-to-skip File attributes that should be skipped. + --before-context Number of lines to show before matching line. + --case-sensitive Specifies case-sensitive matching. + -c, --content [] Regular expression for files' content. + --content-mode Defines which parts of a content should be included in the results. + --context Number of lines to show before and after matching line. + --count Show number of matches in a file. + -y, --display Display of the results. + -d, --dry-run Display which files should be updated but do not actually update any file. + --encoding Encoding to use when a file does not contain BOM. Default encoding is UTF-8. + -e, --extension EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). + -h, --help Show command line help. + -t, --highlight Parts of the output to highlight. + -i, --include-directory [] Regular expression for a directory name. + --input [] The input string to be searched. + --interactive Enable editing of a replacement. + --line-number Include line number. + -m, --max-count Stop searching after specified number is reached. + --max-matches-in-file Stop searching in a file after specified number of matches is found. + --max-matching-files Stop searching after specified number of files is found. + --max-word-length Specifies maximal word length to be checked. + --min-word-length Specifies minimal word length to be checked. Default value is 3. + -n, --name [] Regular expression for file or directory name. + -C, --no-content A shortcut for '--content-mode omit'. + -P, --no-path A shortcut for '--path-mode omit'. + --no-recurse Do not search subdirectories. + -o, --output [] Path to a file that should store output. + --path-mode Defines which part of a path should be included in the results. + --paths Path to one or more files and/or directories that should be searched. + --paths-from Read the list of paths to search from a file. Paths should be separated by newlines. + --pipe Defines how to use redirected/piped input. + --progress Display dot (.) for every hundredth searched file or directory. + -p, --properties Display file's properties and optionally filter by that properties. + -s, --sort Sort matched files and directories. + -u, --summary Show summary at the end of search. + -v, --verbosity The amount of information to display in the log. + --words Specified path to file and/or directory that contains list of allowed words. ---------- @@ -394,268 +489,281 @@ Synchronizes content of two directories. Usage: orang sync [] [options] Arguments: - [] Path to a first directory to be synchronized and optionally a second directory. + Path to a first directory to be synchronized and optionally a second directory. Options: - [ --ask] Ask for a permission to synchronize file or directory. - [-a, --attributes] File attributes that are required. - [-b, --attributes-to-skip] File attributes that should be skipped. - [ --compare] File properties to be compared. - [ --conflict] Action to choose if a file or directory exists in one directory and it is missing in the second directory. - [-c, --content] [] Regular expression for files' content. - [-y, --display] Display of the results. - [-d, --dry-run] Display which files or directories should be copied/deleted but do not actually copy/delete any file or directory. - [ --encoding] Encoding to use when a file does not contain BOM. Default encoding is UTF-8. - [-e, --extension] EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). - [-h, --help] Show command line help. - [-t, --highlight] Parts of the output to highlight. - [-i, --include-directory] [] Regular expression for a directory name. - [-m, --max-count] Stop searching after specified number is reached. - [-n, --name] [] Regular expression for file or directory name. - [ --no-recurse] Do not search subdirectories. - [-o, --output] [] Path to a file that should store output. - [ --paths] Path to one or more files and/or directories that should be searched. - [ --paths-from] Read the list of paths to search from a file. Paths should be separated by newlines. - [ --progress] Display dot (.) for every hundredth searched file or directory. - [-p, --properties] A filter for file properties. - [ --second] A directory to be synchronized with a first directory. It can be also specified as a last unnamed parameter. - [-s, --sort] Sort matched files and directories. - [-v, --verbosity] The amount of information to display in the log. + --after-context Number of lines to show after matching line. + --align-columns Align columns. + --ask Ask for a permission to synchronize file or directory. + -a, --attributes File attributes that are required. + -A, --attributes-to-skip File attributes that should be skipped. + --before-context Number of lines to show before matching line. + --compare File properties to be compared. + --conflict Action to choose if a file or directory exists in one directory and it is missing in the second directory. + -c, --content [] Regular expression for files' content. + --content-mode Defines which parts of a content should be included in the results. + --context Number of lines to show before and after matching line. + --count Show number of matches in a file. + -y, --display Display of the results. + -d, --dry-run Display which files or directories should be copied/deleted but do not actually copy/delete any file or directory. + --encoding Encoding to use when a file does not contain BOM. Default encoding is UTF-8. + -e, --extension EXT1[,EXT2] [] A filter for file extensions (case-insensitive by default). + -h, --help Show command line help. + -t, --highlight Parts of the output to highlight. + -i, --include-directory [] Regular expression for a directory name. + --line-number Include line number. + -m, --max-count Stop searching after specified number is reached. + --max-matches-in-file Stop searching in a file after specified number of matches is found. + --max-matching-files Stop searching after specified number of files is found. + -n, --name [] Regular expression for file or directory name. + -C, --no-content A shortcut for '--content-mode omit'. + -P, --no-path A shortcut for '--path-mode omit'. + --no-recurse Do not search subdirectories. + -o, --output [] Path to a file that should store output. + --path-mode Defines which part of a path should be included in the results. + --paths Path to one or more files and/or directories that should be searched. + --paths-from Read the list of paths to search from a file. Paths should be separated by newlines. + --progress Display dot (.) for every hundredth searched file or directory. + -p, --properties Display file's properties and optionally filter by that properties. + --second A directory to be synchronized with a first directory. It can be also specified as a last unnamed parameter. + -s, --sort Sort matched files and directories. + -u, --summary Show summary at the end of search. + -v, --verbosity The amount of information to display in the log. ---------- Values: - file f Ask for confirmation after each file. - value v Ask for confirmation after each value. + f, file Ask for confirmation after each file. + v, value Ask for confirmation after each value. - archive - - compressed - - directory d - empty e - encrypted - - file f - hidden h - normal - - offline - - read-only r - reparse-point rp - system s - temporary - + archive + compressed + d, directory + e, empty + encrypted + f, file + h, hidden + normal + offline + r, read-only + rp, reparse-point + s, system + temporary - none n Compare files only by name. - attributes a Compare file attributes. - content c Compare file content. - modified-time mt Compare time a file was last modified. - size s Compare file size. + n, none Compare files only by name. + a, attributes Compare file attributes. + c, content Compare file content. + mt, modified-time Compare time a file was last modified. + s, size Compare file size. - ask a Ask when a file or already exists. - overwrite o Overwrite a file when it already exists. - suffix - Add suffix to file name if it already exists. - skip s Do not copy or move a file if it already exists. - - - all-lines a Display all lines. - line l Display entire line containing the matched value. - unmatched-lines u Display all lines that do not contain the matched value. - value v Display just the matched value. - value-detail d Display matched value and include information about each value such as index or length. - omit o Do not display file's content. + a, ask Ask when a file or already exists. + o, overwrite Overwrite a file when it already exists. + suffix Add suffix to file name if it already exists. + s, skip Do not copy or move a file if it already exists. + + + a, all-lines Display all lines. + l, line Display entire line containing the matched value. + u, unmatched-lines Display all lines that do not contain the matched value. + v, value Display just the matched value. + d, value-detail Display matched value and include information about each value such as index or length. + o, omit Do not display file's content. - content= c - context= co A number of lines to display before and after matching line. - context-before= b A number of lines to display before matching line. - context-after= a A number of lines to display after matching line. - count c Include number of matches in file. - creation-time ct Include file creation time. - indent= - Indentation for a list of results. Default indentation are 2 spaces. - line-number l Include line number. - modified-time mt Include file last modified time. - no-align - Do not align columns. - path= p - size s Include file size. - separator= s String that separate each value. - summary su Include summary. - trim-line - Trim leading and trailing white-space from a line. + c, content= + co, context= A number of lines to display before and after matching line. + b, context-before= A number of lines to display before matching line. + a, context-after= A number of lines to display after matching line. + c, count Include number of matches in file. + ct, creation-time Include file creation time. + indent= Indentation for a list of results. Default indentation are 2 spaces. + l, line-number Include line number. + mt, modified-time Include file last modified time. + no-align Do not align columns. + p, path= + s, size Include file size. + s, separator= String that separate each value. + su, summary Include summary. + trim-line Trim leading and trailing white-space from a line. - case-sensitive cs Use case-sensitive matching. - culture-invariant ci Ignore cultural differences between languages. - from-file f Load pattern from a file. - list-separator= ls String that separate each value in a list. Default value is comma (,) or newline if the list is loaded from a file. - literal l Pattern should be treated as a literal expression and not as a regular expression. - negative ne Search succeeds if the regular expression does not match. - timeout= - Match time-out interval in seconds. + cs, case-sensitive Use case-sensitive matching. + ci, culture-invariant Ignore cultural differences between languages. + f, from-file Load pattern from a file. + ls, list-separator= String that separate each value in a list. Default value is comma (,) or newline if the list is loaded from a file. + l, literal Pattern should be treated as a literal expression and not as a regular expression. + ne, negative Search succeeds if the regular expression does not match. + timeout= Match time-out interval in seconds. - creation-time= ct Filter files by creation time (See 'Expression syntax' for other expressions). - modified-time= mt Filter files by modified time (See 'Expression syntax' for other expressions). - size= s Filter files by size (See 'Expression syntax' for other expressions). + ct, creation-time= Show file's creation time and optionally define condition (See 'Expression syntax' for other expressions). + mt, modified-time= Show file's modified time and optionally define condition (See 'Expression syntax' for other expressions). + s, size= Show file's size and optionally define condition (See 'Expression syntax' for other expressions). - none n No highlighting. - match m Highlight match value. - replacement r Highlight replacement value. - split s Highlight split value. - empty-match em Highlight match value that is empty string. - empty-replacement er Highlight replacement value that is empty string. - empty-split es Highlight split value that is empty string. - empty e Highlight value that is empty string. - boundary b Highlight start and end of the value. - tab t Highlight tab character. - carriage-return cr Highlight carriage return character. - linefeed lf Highlight linefeed character. - newline - Highlight carriage return and linefeed characters. - space - Highlight space character. + n, none No highlighting. + m, match Highlight match value. + r, replacement Highlight replacement value. + s, split Highlight split value. + em, empty-match Highlight match value that is empty string. + er, empty-replacement Highlight replacement value that is empty string. + es, empty-split Highlight split value that is empty string. + e, empty Highlight value that is empty string. + b, boundary Highlight start and end of the value. + t, tab Highlight tab character. + cr, carriage-return Highlight carriage return character. + lf, linefeed Highlight linefeed character. + newline Highlight carriage return and linefeed characters. + space Highlight space character. - escape e Interpret literals \a, \b, \f, \n, \r, \t and \v as character escapes. - - - - Stop searching after matching files and/or directories. - matches= m Stop searching in each file after matches. + e, escape Interpret literals \a, \b, \f, \n, \r, \t and \v as character escapes. - aggregate ag Display list of all values at the end of search. - aggregate-only o Display only list of all values at the end of search. - ascending a Sort values in an ascending order. - culture-invariant ci Ignore cultural differences between languages. - descending d Sort values in a descending order. - distinct di Return distinct values. - except - Return values from first file except values from second file. - intersect - Return values that were found in all files. - group - Group matching files by matched values. - ignore-case i Use case-insensitive matching. - remove-empty re Remove values that are empty strings. - remove-white-space rw Remove values that are empty or consist of white-space. - sort-by= - - to-lower tl Convert value to lowercase. - to-upper tu Convert value to uppercase. - trim t Trim leading and trailing white-space. - trim-end te Trim trailing white-space. - trim-start ts Trim leading white-space. + ag, aggregate Display list of all values at the end of search. + o, aggregate-only Display only list of all values at the end of search. + a, ascending Sort values in an ascending order. + ci, culture-invariant Ignore cultural differences between languages. + d, descending Sort values in a descending order. + di, distinct Return distinct values. + except Return values from first file except values from second file. + intersect Return values that were found in all files. + group Group matching files by matched values. + count Show number of values in a group. + i, ignore-case Use case-insensitive matching. + re, remove-empty Remove values that are empty strings. + rw, remove-white-space Remove values that are empty or consist of white-space. + sort-by= + tl, to-lower Convert value to lowercase. + tu, to-upper Convert value to uppercase. + t, trim Trim leading and trailing white-space. + te, trim-end Trim trailing white-space. + ts, trim-start Trim leading white-space. - extension e Search in file extension. - full-name f Search in full path. - name n Search in file name and its extension. - name-without-extension w Search in file name without extension. + e, extension Search in file extension. + f, full-name Search in full path. + n, name Search in file name and its extension. + w, name-without-extension Search in file name without extension. - encoding= e - verbosity= v - append a If the file exists output will be appended to the end of the file. + e, encoding= + v, verbosity= + a, append If the file exists output will be appended to the end of the file. - - full f Display full path. - relative r Display path relatively to the base directory. - match m Display only match. - omit o Do not display path. + + f, full Display full path. + r, relative Display path relatively to the base directory. + m, match Display only match. + o, omit Do not display path. - compiled - Compile the regular expression to an assembly. - culture-invariant ci Ignore cultural differences between languages. - ecma-script es Enable ECMAScript-compliant behavior for the expression. - ends-with ew Pattern should match from the end of the input string. - equals e Pattern should match whole input string. - explicit-capture n Do not capture unnamed groups. - from-file f Load pattern from a file. - group= g - ignore-case i Use case-insensitive matching. - ignore-pattern-whitespace x Exclude unescaped white-space from the pattern and enable comments after a number sign (#). - list li Interpret pattern as a list of patterns any of which is to be matched. Separator is either comma (,) or newline if the list is loaded from a file. - length= - Include matches whose length matches the expression (See 'Expression syntax' for other expressions). - list-separator= ls String that separate each value in a list. Default value is comma (,) or newline if the list is loaded from a file. - literal l Pattern should be treated as a literal expression and not as a regular expression. - multiline m ^ and $ match the beginning and end of each line (instead of the beginning and end of the input string). - negative ne Search succeeds if the regular expression does not match. - part= p The part of a file or a directory name that should be matched. - right-to-left r Specifies that the search will be from right to left. - singleline s The period (.) matches every character (instead of every character except \n). - starts-with sw Pattern should match from the start of the input string. - timeout= - Match time-out interval in seconds. - whole-line wl Pattern should match whole line. - whole-word w Pattern should match whole word. + compiled Compile the regular expression to an assembly. + ci, culture-invariant Ignore cultural differences between languages. + es, ecma-script Enable ECMAScript-compliant behavior for the expression. + ew, ends-with Pattern should match from the end of the input string. + e, equals Pattern should match whole input string. + n, explicit-capture Do not capture unnamed groups. + f, from-file Load pattern from a file. + g, group= + i, ignore-case Use case-insensitive matching. + x, ignore-pattern-whitespace Exclude unescaped white-space from the pattern and enable comments after a number sign (#). + li, list Interpret pattern as a list of patterns any of which is to be matched. Separator is either comma (,) or newline if the list is loaded from a file. + length= Include matches whose length matches the expression (See 'Expression syntax' for other expressions). + ls, list-separator= String that separate each value in a list. Default value is comma (,) or newline if the list is loaded from a file. + l, literal Pattern should be treated as a literal expression and not as a regular expression. + m, multiline ^ and $ match the beginning and end of each line (instead of the beginning and end of the input string). + ne, negative Search succeeds if the regular expression does not match. + p, part= The part of a file or a directory name that should be matched. + r, right-to-left Specifies that the search will be from right to left. + s, singleline The period (.) matches every character (instead of every character except \n). + sw, starts-with Pattern should match from the start of the input string. + timeout= Match time-out interval in seconds. + wl, whole-line Pattern should match whole line. + w, whole-word Pattern should match whole word. - text t Use redirected input as a text to be searched. - paths p Use redirected input as a list of paths separated with newlines. + t, text Use redirected input as a text to be searched. + p, paths Use redirected input as a list of paths separated with newlines. - compiled c Compile the regular expression to an assembly. - culture-invariant ci Ignore cultural differences between languages. - ecma-script es Enable ECMAScript-compliant behavior for the expression. - explicit-capture n Do not capture unnamed groups. - ignore-case i Use case-insensitive matching. - ignore-pattern-whitespace x Exclude unescaped white-space from the pattern and enable comments after a number sign (#). - multiline m ^ and $ match the beginning and end of each line (instead of the beginning and end of the input string). - right-to-left r Specifies that the search will be from right to left. - singleline s The period (.) matches every character (instead of every character except \n). + c, compiled Compile the regular expression to an assembly. + ci, culture-invariant Ignore cultural differences between languages. + es, ecma-script Enable ECMAScript-compliant behavior for the expression. + n, explicit-capture Do not capture unnamed groups. + i, ignore-case Use case-insensitive matching. + x, ignore-pattern-whitespace Exclude unescaped white-space from the pattern and enable comments after a number sign (#). + m, multiline ^ and $ match the beginning and end of each line (instead of the beginning and end of the input string). + r, right-to-left Specifies that the search will be from right to left. + s, singleline The period (.) matches every character (instead of every character except \n). - culture-invariant ci Ignore cultural differences between languages. - to-lower tl Convert value to lowercase. - to-upper tu Convert value to uppercase. - trim t Trim leading and trailing white-space. - trim-end te Trim trailing white-space. - trim-start ts Trim leading white-space. + ci, culture-invariant Ignore cultural differences between languages. + tl, to-lower Convert value to lowercase. + tu, to-upper Convert value to uppercase. + t, trim Trim leading and trailing white-space. + te, trim-end Trim trailing white-space. + ts, trim-start Trim leading white-space. - from-file f Load text from a file whose path is specified in value. - literal l Replacement should be treated as a literal expression and not as a replacement expression. - escape e Interpret literals \a, \b, \f, \n, \r, \t and \v as character escapes. - csharp cs is either expression-body of a method with signature 'string M(Match match)' - or a path to a code file that contains public method with signature 'string M(Match match)'. - Imported namespaces (when inline expression is specified): - System - System.Collections.Generic - System.Linq - System.Text - System.Text.RegularExpressions - from-dll - is a path to a method in DLL file. The format is 'DllPath,FullTypeName.MethodName'. + f, from-file Load text from a file whose path is specified in value. + l, literal Replacement should be treated as a literal expression and not as a replacement expression. + e, escape Interpret literals \a, \b, \f, \n, \r, \t and \v as character escapes. + cs, csharp is either expression-body of a method with signature 'string M(Match match)' + or a path to a code file that contains public method with signature 'string M(Match match)'. + Imported namespaces (when inline expression is specified): + System + System.Collections.Generic + System.Linq + System.Text + System.Text.RegularExpressions + from-dll is a path to a method in DLL file. The format is 'DllPath,FullTypeName.MethodName'. - ascending a Sort items in ascending order. - creation-time ct Sort items by creation time. - culture-invariant ci Ignore cultural differences between languages. - descending d Sort items in descending order. - max-count= m Show only items. - modified-time mt Sort items by last modified time. - name n Sort items by full name. - size s Sort items by size. + a, ascending Sort items in ascending order. + ct, creation-time Sort items by creation time. + ci, culture-invariant Ignore cultural differences between languages. + d, descending Sort items in descending order. + m, max-count= Show only items. + mt, modified-time Sort items by last modified time. + n, name Sort items by full name. + s, size Sort items by size. - length l Sort values by value's length. + l, length Sort values by value's length. + c, count Sort values by group's count. - ask a - first-wins f - second-wins s + a, ask + f, first-wins + s, second-wins - alternation-constructs ac - anchors a - backreference-constructs b - character-classes c - character-escapes ce - general-categories gc - grouping-constructs g - miscellaneous m - named-blocks n - options o - quantifiers q - substitutions s + ac, alternation-constructs + a, anchors + b, backreference-constructs + c, character-classes + ce, character-escapes + gc, general-categories + g, grouping-constructs + m, miscellaneous + n, named-blocks + o, options + ro, regex-options + q, quantifiers + s, substitutions + all - quiet q - minimal m - normal n - detailed d - diagnostic di + q, quiet + m, minimal + n, normal + d, detailed + di, diagnostic Expression syntax: x=n diff --git a/docs/cli/move-command.md b/docs/cli/move-command.md index 6594035a..122f7c2f 100644 --- a/docs/cli/move-command.md +++ b/docs/cli/move-command.md @@ -7,32 +7,44 @@ Searches the file system for files and directories and move them to a destinatio ## Synopsis ``` -orang move [] -[ --ask] -[-a|--attributes] -[-b|--attributes-to-skip] -[ --compare] -[ --conflict] -[-c|--content] [] -[-y|--display] -[-d|--dry-run] -[ --encoding] -[-e|--extension] EXT1[,EXT2] [] -[ --flat] -[-h|--help] -[-t|--highlight] -[-i|--include-directory] [] -[-m|--max-count] -[-n|--name] [] -[ --no-recurse] -[-o|--output] [] -[ --paths] -[ --paths-from] -[ --progress] -[-p|--properties] -[-s|--sort] -[ --target] -[-v|--verbosity] +orang move + --after-context + --align-columns + --ask +-a, --attributes +-A, --attributes-to-skip + --before-context + --compare + --conflict +-c, --content [] + --content-mode + --context + --count +-d, --dry-run + --encoding +-e, --extension EXT1[,EXT2] [] + --flat +-h, --help +-t, --highlight +-i, --include-directory [] + --line-number +-m, --max-count + --max-matches-in-file + --max-matching-files +-n, --name [] +-C, --no-content +-P, --no-path + --no-recurse +-o, --output [] + --path-mode + --paths + --paths-from + --progress +-p, --properties +-s, --sort +-u, --summary + --target +-v, --verbosity ``` ## Arguments @@ -43,125 +55,173 @@ Path to one or more source directories and optionally a target directory\. ## Options -##### `[--ask]` +##### `--after-context ` + +Number of lines to show after matching line\. + +##### `--align-columns` + +Align columns\. + +##### `--ask` Ask for a permission to move file or directory\. -##### `[-a|--attributes] ` +##### `-a, --attributes ` File attributes that are required\. [\](OptionValues.md#attributes): `archive`, `compressed`, `d[irectory]`, `e[mpty]`, `encrypted`, `f[ile]`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[-b|--attributes-to-skip] ` +##### `-A, --attributes-to-skip ` File attributes that should be skipped\. [\](OptionValues.md#attributes): `archive`, `compressed`, `e[mpty]`, `encrypted`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[--compare] ` +##### `--before-context ` + +Number of lines to show before matching line\. + +##### `--compare ` File properties to be compared\. [\](OptionValues.md#compare_options): `n[one]`, `a[ttributes]`, `c[ontent]`, `m[odified-]t[ime]`, `s[ize]`\. -##### `[--conflict] ` +##### `--conflict ` Defines how to resolve conflict when a file/directory already exists\. [\](OptionValues.md#conflict_resolution): `a[sk]`, `o[verwrite]`, `suffix`, `s[kip]`\. -##### `[-c|--content] []` +##### `-c, --content []` Regular expression for files' content\. [\](OptionValues.md#pattern_options): `compiled`, `c[ulture-]i[nvariant]`, `e[cma-]s[cript]`, `e[nds-]w[ith]`, `e[quals]`, `n [explicit-capture]`, `f[rom-file]`, `g[roup]=`, `i[gnore-case]`, `x [ignore-pattern-whitespace]`, `li[st]`, `length=`, `l[ist-]s[eparator]`, `l[iteral]`, `m[ultiline]`, `ne[gative]`, `r[ight-to-left]`, `s[ingleline]`, `s[tarts-]w[ith]`, `timeout=`, `w[hole-]l[ine]`, `w[hole-word]`\. -##### `[-y|--display] ` +##### `--content-mode ` -Display of the results\. +Defines which parts of a content should be included in the results\. -[\](OptionValues.md#display_options): `c[ontent]=`[\](OptionValues.md#content_display), `co[ntext]=`, `b [context-before]=`, `a [context-after]=`, `c[ount]`, `c[reation-]t[ime]`, `indent=`, `l[ine-number]`, `m[odified-]t[ime]`, `no-align`, `p[ath]=`[\](OptionValues.md#path_display), `s[ize]`, `s[eparator]=`, `su[mmary]`, `trim-line`\. +[\](OptionValues.md#content_mode): `a[ll-lines]`, `l[ine]`, `u[nmatched-lines]`, `v[alue]`, `d [value-detail]`, `o[mit]`\. -##### `[-d|--dry-run]` +##### `--context ` + +Number of lines to show before and after matching line\. + +##### `--count` + +Show number of matches in a file\. + +##### `-d, --dry-run` Display which files/directories should be moved but do not actually move any file/directory\. -##### `[--encoding] ` +##### `--encoding ` Encoding to use when a file does not contain BOM\. Default encoding is UTF\-8\. -##### `[-e|--extension] EXT1[,EXT2] []` +##### `-e, --extension EXT1[,EXT2] []` A filter for file extensions \(case\-insensitive by default\)\. [\](OptionValues.md#extension_options): `c[ase-]s[ensitive]`, `c[ulture-]i[nvariant]`, `f[rom-file]`, `l[ist-]s[eparator]`, `l[iteral]`, `ne[gative]`, `timeout=`\. -##### `[--flat]` +##### `--flat` Move files directly into target directory\. -##### `[-h|--help]` +##### `-h, --help` Show command line help\. -##### `[-t|--highlight] ` +##### `-t, --highlight ` Parts of the output to highlight\. [\](OptionValues.md#highlight): `n[one]`, `m[atch]`, `e[mpty-]m[atch]`, `e[mpty]`, `b[oundary]`, `t[ab]`, `c[arriage-]r[eturn]`, `l[ine]f[eed]`, `newline`, `space`\. -##### `[-i|--include-directory] []` +##### `-i, --include-directory []` Regular expression for a directory name\. -##### `[-m|--max-count] ` +##### `--line-number` + +Include line number\. + +##### `-m, --max-count ` Stop searching after specified number is reached\. -[\](OptionValues.md#max_options): ``, `m[atches]=`\. +##### `--max-matches-in-file ` -##### `[-n|--name] []` +Stop searching in a file after specified number of matches is found\. + +##### `--max-matching-files ` + +Stop searching after specified number of files is found\. + +##### `-n, --name []` Regular expression for file or directory name\. -##### `[--no-recurse]` +##### `-C, --no-content` + +A shortcut for '\-\-content\-mode omit'\. + +##### `-P, --no-path` + +A shortcut for '\-\-path\-mode omit'\. + +##### `--no-recurse` Do not search subdirectories\. -##### `[-o|--output] []` +##### `-o, --output []` Path to a file that should store output\. -##### `[--paths] ` +##### `--path-mode ` + +Defines which part of a path should be included in the results\. + +[\](OptionValues.md#path_mode): `f[ull]`, `r[elative]`, `m[atch]`, `o[mit]`\. + +##### `--paths ` Path to one or more files and/or directories that should be searched\. -##### `[--paths-from] ` +##### `--paths-from ` Read the list of paths to search from a file\. Paths should be separated by newlines\. -##### `[--progress]` +##### `--progress` Display dot \(\.\) for every hundredth searched file or directory\. -##### `[-p|--properties] ` +##### `-p, --properties ` -A filter for file properties\. +Display file's properties and optionally filter by that properties\. -[\](OptionValues.md#file_properties): `c[reation-]t[ime]`, `m[odified-]t[ime]`, `s[ize]=`\. +[\](OptionValues.md#file_properties): `c[reation-]t[ime][=]`, `m[odified-]t[ime][=]`, `s[ize][=]`\. -##### `[-s|--sort] ` +##### `-s, --sort ` Sort matched files and directories\. [\](OptionValues.md#sort_options): `a[scending]`, `c[reation-]t[ime]`, `ci [culture-invariant]`, `d[escending]`, `m[ax-count]=`, `m[odified-]t[ime]`, `n[ame]`, `s[ize]`\. -##### `[--target] ` +##### `-u, --summary` + +Show summary at the end of search\. + +##### `--target ` A directory to move files and directories to\. It can be also specified as a last unnamed parameter\. -##### `[-v|--verbosity] ` +##### `-v, --verbosity ` The amount of information to display in the log\. diff --git a/docs/cli/regex-escape-command.md b/docs/cli/regex-escape-command.md new file mode 100644 index 00000000..ac9fa02e --- /dev/null +++ b/docs/cli/regex-escape-command.md @@ -0,0 +1,69 @@ +# `orang regex escape` + +Escapes special characters by replacing them with their escape codes\. + +[Home](README.md#readme) • [Synopsis](#Synopsis) • [Arguments](#Arguments) • [Options](#Options) • [Samples](#Samples) + +## Synopsis + +``` +orang regex escape + --char-group +-h, --help +-i, --input [] +-o, --output [] +-r, --replacement +-v, --verbosity +``` + +## Options + +##### `--char-group` + +Text is part of a character group\. + +##### `-h, --help` + +Show command line help\. + +##### `-i, --input []` + +Text to be escaped\. + +##### `-o, --output []` + +Path to a file that should store output\. + +##### `-r, --replacement` + +Text is a replacement string\. + +##### `-v, --verbosity ` + +The amount of information to display in the log\. + +[\](OptionValues.md#verbosity): `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, `di[agnostic]`\. + +## Redirected/Piped Input + +Redirected/piped input will be used as a text to be escaped. + +## Samples + +### Sample + +Escape a given path so it will be treated as a literal string and not a regular expression. + +#### Syntax + +``` +orang regex escape --input "foo\bar.txt" +``` + +#### Short Syntax + +``` +orang regex escape -i "foo\bar.txt" +``` + +*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* \ No newline at end of file diff --git a/docs/cli/regex-list-command.md b/docs/cli/regex-list-command.md new file mode 100644 index 00000000..9bad12c8 --- /dev/null +++ b/docs/cli/regex-list-command.md @@ -0,0 +1,107 @@ +# `orang regex list` + +Lists regular expression patterns\. + +[Home](README.md#readme) • [Synopsis](#Synopsis) • [Arguments](#Arguments) • [Options](#Options) • [Samples](#Samples) + +## Synopsis + +``` +orang regex list + --char-group +-f, --filter [] +-h, --help +-o, --options +-s, --section +-v, --verbosity +``` + +## Arguments + +**``** + +Character or a decimal number that represents the character\. For a number literal use escape like \\1\. + +## Options + +##### `--char-group` + +Treat character as if it is in the character group\. + +##### `-f, --filter []` + +Regular expression to filter patterns \(case\-insensitive by default\)\. + +##### `-h, --help` + +Show command line help\. + +##### `-o, --options ` + +Regex options that should be used\. Relevant values are ecma\-script or ignore\-case\. + +[\](OptionValues.md#regex_options): `c[ompiled]`, `c[ulture-]i[nvariant]`, `e[cma-]s[cript]`, `n [explicit-capture]`, `i[gnore-case]`, `x [ignore-pattern-whitespace]`, `m[ultiline]`, `r[ight-to-left]`, `s[ingleline]`\. + +##### `-s, --section ` + +Syntax sections to filter\. + +[\](OptionValues.md#syntax_sections): `a[lternation-]c[onstructs]`, `a[nchors]`, `b[ackreference-constructs]`, `c[haracter-classes]`, `c[haracter-]e[scapes]`, `g[eneral-]c[ategories]`, `g[rouping-constructs]`, `m[iscellaneous]`, `n[amed-blocks]`, `o[ptions]`, `r[egex-]o[ptions]`, `q[uantifiers]`, `s[ubstitutions]`, `all`\. + +##### `-v, --verbosity ` + +The amount of information to display in the log\. + +[\](OptionValues.md#verbosity): `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, `di[agnostic]`\. + +### Sample + +Display regular expression anchors. + +#### Syntax + +``` +orang regex list --section anchors +``` + +#### Short Syntax + +``` +orang regex list -s a +``` + +### Sample + +Display general categories that matches filter string "num". + +#### Syntax + +``` +orang regex list --section general-categories --filter num + +``` + +#### Short Syntax + +``` +orang regex list -s gc -f num +``` + +### Sample + +Display named blocks that matches filter string "han". + +#### Syntax + +``` +orang regex list --section named-blocks --filter han + +``` + +#### Short Syntax + +``` +orang regex list -s nb -f han +``` + +*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* \ No newline at end of file diff --git a/docs/cli/regex-match-command.md b/docs/cli/regex-match-command.md new file mode 100644 index 00000000..b46c1ef2 --- /dev/null +++ b/docs/cli/regex-match-command.md @@ -0,0 +1,85 @@ +# `orang regex match` + +Searches the input string for occurrences of the regular expression\. + +[Home](README.md#readme) • [Synopsis](#Synopsis) • [Arguments](#Arguments) • [Options](#Options) • [Samples](#Samples) + +## Synopsis + +``` +orang regex match +-c, --content [] + --content-mode +-h, --help +-t, --highlight +-i, --input [] +-m, --max-count + --modify +-o, --output [] +-u, --summary +-v, --verbosity +``` + +## Arguments + +**``** + +Path to a file that should be analyzed\. + +## Options + +##### `-c, --content []` + +Regular expression for the input string\. + +[\](OptionValues.md#pattern_options): `compiled`, `c[ulture-]i[nvariant]`, `e[cma-]s[cript]`, `e[nds-]w[ith]`, `e[quals]`, `n [explicit-capture]`, `f[rom-file]`, `g[roup]=`, `i[gnore-case]`, `x [ignore-pattern-whitespace]`, `li[st]`, `length=`, `l[ist-]s[eparator]`, `l[iteral]`, `m[ultiline]`, `r[ight-to-left]`, `s[ingleline]`, `s[tarts-]w[ith]`, `timeout=`, `w[hole-]l[ine]`, `w[hole-word]`\. + +##### `--content-mode ` + +Defines which parts of a content should be included in the results\. + +[\](OptionValues.md#content_mode): `a[ll-lines]`, `l[ine]`, `u[nmatched-lines]`, `v[alue]`, `d [value-detail]`, `o[mit]`\. + +##### `-h, --help` + +Show command line help\. + +##### `-t, --highlight ` + +Parts of the output to highlight\. + +[\](OptionValues.md#highlight): `n[one]`, `m[atch]`, `e[mpty-]m[atch]`, `e[mpty]`, `b[oundary]`, `t[ab]`, `c[arriage-]r[eturn]`, `l[ine]f[eed]`, `newline`, `space`\. + +##### `-i, --input []` + +The input string to be searched\. + +##### `-m, --max-count ` + +Maximum number of matches returned\. + +##### `--modify ` + +Functions to modify results\. + +[\](OptionValues.md#modify_options): `ag[gregate]`, `o [aggregate-only]`, `a[scending]`, `ci [culture-invariant]`, `d[escending]`, `di[stinct]`, `except`, `intersect`, `group`, `count`, `i[gnore-case]`, `re[move-empty]`, `rw [remove-white-space]`, `sort-by=`[\](OptionValues.md#sort_property), `tl [to-lower]`, `tu [to-upper]`, `t[rim]`, `te [trim-end]`, `ts [trim-start]`\. + +##### `-o, --output []` + +Path to a file that should store output\. + +##### `-u, --summary` + +Show summary at the end of search\. + +##### `-v, --verbosity ` + +The amount of information to display in the log\. + +[\](OptionValues.md#verbosity): `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, `di[agnostic]`\. + +## Redirected/Piped Input + +Redirected/piped input will be used as a text to be searched. + +*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* \ No newline at end of file diff --git a/docs/cli/regex-split-command.md b/docs/cli/regex-split-command.md new file mode 100644 index 00000000..434e9770 --- /dev/null +++ b/docs/cli/regex-split-command.md @@ -0,0 +1,90 @@ +# `orang regex split` + +Splits the input string into an list of substrings at the positions defined by a regular expression\. + +[Home](README.md#readme) • [Synopsis](#Synopsis) • [Arguments](#Arguments) • [Options](#Options) • [Samples](#Samples) + +## Synopsis + +``` +orang regex split +-c, --content [] + --content-mode +-h, --help +-t, --highlight +-i, --input [] +-m, --max-count + --modify + --no-groups +-o, --output [] +-u, --summary +-v, --verbosity +``` + +## Arguments + +**``** + +Path to a file that should be analyzed\. + +## Options + +##### `-c, --content []` + +Regular expression for the input string\. + +[\](OptionValues.md#pattern_options): `compiled`, `c[ulture-]i[nvariant]`, `e[cma-]s[cript]`, `e[nds-]w[ith]`, `e[quals]`, `n [explicit-capture]`, `f[rom-file]`, `i[gnore-case]`, `x [ignore-pattern-whitespace]`, `li[st]`, `length=`, `l[ist-]s[eparator]`, `l[iteral]`, `m[ultiline]`, `r[ight-to-left]`, `s[ingleline]`, `s[tarts-]w[ith]`, `timeout=`, `w[hole-]l[ine]`, `w[hole-word]`\. + +##### `--content-mode ` + +Defines which parts of a content should be included in the results\. + +[\](OptionValues.md#content_mode): `a[ll-lines]`, `l[ine]`, `u[nmatched-lines]`, `v[alue]`, `d [value-detail]`, `o[mit]`\. + +##### `-h, --help` + +Show command line help\. + +##### `-t, --highlight ` + +Parts of the output to highlight\. + +[\](OptionValues.md#highlight): `n[one]`, `s[plit]`, `e[mpty-]s[plit]`, `e[mpty]`, `b[oundary]`, `t[ab]`, `c[arriage-]r[eturn]`, `l[ine]f[eed]`, `newline`, `space`\. + +##### `-i, --input []` + +The input string to be searched\. + +##### `-m, --max-count ` + +Maximum number of times the split can occur\. + +##### `--modify ` + +Functions to modify results\. + +[\](OptionValues.md#modify_options): `ag[gregate]`, `o [aggregate-only]`, `a[scending]`, `ci [culture-invariant]`, `d[escending]`, `di[stinct]`, `except`, `intersect`, `group`, `count`, `i[gnore-case]`, `re[move-empty]`, `rw [remove-white-space]`, `sort-by=`[\](OptionValues.md#sort_property), `tl [to-lower]`, `tu [to-upper]`, `t[rim]`, `te [trim-end]`, `ts [trim-start]`\. + +##### `--no-groups` + +Do not include groups in the results\. + +##### `-o, --output []` + +Path to a file that should store output\. + +##### `-u, --summary` + +Show summary at the end of search\. + +##### `-v, --verbosity ` + +The amount of information to display in the log\. + +[\](OptionValues.md#verbosity): `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, `di[agnostic]`\. + +## Redirected/Piped Input + +Redirected/piped input will be used as a text to be searched. + +*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)* \ No newline at end of file diff --git a/docs/cli/rename-command.md b/docs/cli/rename-command.md index 07e6e96c..9f34815a 100644 --- a/docs/cli/rename-command.md +++ b/docs/cli/rename-command.md @@ -7,32 +7,43 @@ Renames files and directories\. ## Synopsis ``` -orang rename [] -[ --ask] -[-a|--attributes] -[-b|--attributes-to-skip] -[ --conflict] -[-c|--content] [] -[-y|--display] -[-d|--dry-run] -[ --encoding] -[-e|--extension] EXT1[,EXT2] [] -[-h|--help] -[-t|--highlight] -[-i|--include-directory] [] -[ --interactive] -[-m|--max-count] -[ --modify] - -n|--name [] -[ --no-recurse] -[-o|--output] [] -[ --paths] -[ --paths-from] -[ --progress] -[-p|--properties] -[-r|--replacement] [] -[-s|--sort] -[-v|--verbosity] +orang rename + --after-context + --align-columns + --ask +-a, --attributes +-A, --attributes-to-skip + --before-context + --conflict +-c, --content [] + --content-mode + --context + --count +-d, --dry-run + --encoding +-e, --extension EXT1[,EXT2] [] +-h, --help +-t, --highlight +-i, --include-directory [] + --interactive + --line-number +-m, --max-count + --max-matches-in-file + --modify +-n, --name [] +-C, --no-content +-P, --no-path + --no-recurse +-o, --output [] + --path-mode + --paths + --paths-from + --progress +-p, --properties +-r, --replacement [] +-s, --sort +-u, --summary +-v, --verbosity ``` ## Arguments @@ -43,125 +54,171 @@ Path to one or more files and/or directories that should be searched\. ## Options -##### `[--ask]` +##### `--after-context ` + +Number of lines to show after matching line\. + +##### `--align-columns` + +Align columns\. + +##### `--ask` Ask for a permission to rename file or directory\. -##### `[-a|--attributes] ` +##### `-a, --attributes ` File attributes that are required\. [\](OptionValues.md#attributes): `archive`, `compressed`, `d[irectory]`, `e[mpty]`, `encrypted`, `f[ile]`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[-b|--attributes-to-skip] ` +##### `-A, --attributes-to-skip ` File attributes that should be skipped\. [\](OptionValues.md#attributes): `archive`, `compressed`, `e[mpty]`, `encrypted`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[--conflict] ` +##### `--before-context ` + +Number of lines to show before matching line\. + +##### `--conflict ` Defines how to resolve conflict when a file/directory already exists\. [\](OptionValues.md#conflict_resolution): `a[sk]`, `o[verwrite]`, `suffix`, `s[kip]`\. -##### `[-c|--content] []` +##### `-c, --content []` Regular expression for files' content\. [\](OptionValues.md#pattern_options): `compiled`, `c[ulture-]i[nvariant]`, `e[cma-]s[cript]`, `e[nds-]w[ith]`, `e[quals]`, `n [explicit-capture]`, `f[rom-file]`, `g[roup]=`, `i[gnore-case]`, `x [ignore-pattern-whitespace]`, `li[st]`, `length=`, `l[ist-]s[eparator]`, `l[iteral]`, `m[ultiline]`, `ne[gative]`, `r[ight-to-left]`, `s[ingleline]`, `s[tarts-]w[ith]`, `timeout=`, `w[hole-]l[ine]`, `w[hole-word]`\. -##### `[-y|--display] ` +##### `--content-mode ` -Display of the results\. +Defines which parts of a content should be included in the results\. -[\](OptionValues.md#display_options): `c[reation-]t[ime]`, `indent=`, `m[odified-]t[ime]`, `no-align`, `p[ath]=`[\](OptionValues.md#path_display), `s[ize]`, `s[eparator]=`, `su[mmary]`\. +[\](OptionValues.md#content_mode): `a[ll-lines]`, `l[ine]`, `u[nmatched-lines]`, `v[alue]`, `d [value-detail]`, `o[mit]`\. -##### `[-d|--dry-run]` +##### `--context ` + +Number of lines to show before and after matching line\. + +##### `--count` + +Show number of matches in a file\. + +##### `-d, --dry-run` Display which files/directories should be renamed but do not actually rename any file/directory\. -##### `[--encoding] ` +##### `--encoding ` Encoding to use when a file does not contain BOM\. Default encoding is UTF\-8\. -##### `[-e|--extension] EXT1[,EXT2] []` +##### `-e, --extension EXT1[,EXT2] []` A filter for file extensions \(case\-insensitive by default\)\. [\](OptionValues.md#extension_options): `c[ase-]s[ensitive]`, `c[ulture-]i[nvariant]`, `f[rom-file]`, `l[ist-]s[eparator]`, `l[iteral]`, `ne[gative]`, `timeout=`\. -##### `[-h|--help]` +##### `-h, --help` Show command line help\. -##### `[-t|--highlight] ` +##### `-t, --highlight ` Parts of the output to highlight\. [\](OptionValues.md#highlight): `n[one]`, `m[atch]`, `r[eplacement]`, `e[mpty]`\. -##### `[-i|--include-directory] []` +##### `-i, --include-directory []` Regular expression for a directory name\. -##### `[--interactive]` +##### `--interactive` Enable editing of a new name\. -##### `[-m|--max-count] ` +##### `--line-number` + +Include line number\. + +##### `-m, --max-count ` Stop renaming after specified number is reached\. -##### `[--modify] ` +##### `--max-matches-in-file ` + +Stop searching in a file name after specified number of matches is found\. + +##### `--modify ` Functions to modify result\. [\](OptionValues.md#replace_modify): `ci [culture-invariant]`, `tl [to-lower]`, `tu [to-upper]`, `t[rim]`, `te [trim-end]`, `ts [trim-start]`\. -##### `-n|--name []` +##### `-n, --name []` Regular expression for file or directory name\. [\](OptionValues.md#pattern_options): `compiled`, `c[ulture-]i[nvariant]`, `e[cma-]s[cript]`, `e[nds-]w[ith]`, `e[quals]`, `n [explicit-capture]`, `f[rom-file]`, `i[gnore-case]`, `x [ignore-pattern-whitespace]`, `li[st]`, `length=`, `l[ist-]s[eparator]`, `l[iteral]`, `m[ultiline]`, `p[art]=`[\](OptionValues.md#name_part), `r[ight-to-left]`, `s[ingleline]`, `s[tarts-]w[ith]`, `timeout=`, `w[hole-]l[ine]`, `w[hole-word]`\. -##### `[--no-recurse]` +##### `-C, --no-content` + +A shortcut for '\-\-content\-mode omit'\. + +##### `-P, --no-path` + +A shortcut for '\-\-path\-mode omit'\. + +##### `--no-recurse` Do not search subdirectories\. -##### `[-o|--output] []` +##### `-o, --output []` Path to a file that should store output\. -##### `[--paths] ` +##### `--path-mode ` + +Defines which part of a path should be included in the results\. + +[\](OptionValues.md#path_mode): `f[ull]`, `r[elative]`, `m[atch]`, `o[mit]`\. + +##### `--paths ` Path to one or more files and/or directories that should be searched\. -##### `[--paths-from] ` +##### `--paths-from ` Read the list of paths to search from a file\. Paths should be separated by newlines\. -##### `[--progress]` +##### `--progress` Display dot \(\.\) for every hundredth searched file or directory\. -##### `[-p|--properties] ` +##### `-p, --properties ` -A filter for file properties\. +Display file's properties and optionally filter by that properties\. -[\](OptionValues.md#file_properties): `c[reation-]t[ime]`, `m[odified-]t[ime]`, `s[ize]=`\. +[\](OptionValues.md#file_properties): `c[reation-]t[ime][=]`, `m[odified-]t[ime][=]`, `s[ize][=]`\. -##### `[-r|--replacement] []` +##### `-r, --replacement []` Replacement pattern\. -##### `[-s|--sort] ` +##### `-s, --sort ` Sort matched files and directories\. [\](OptionValues.md#sort_options): `a[scending]`, `c[reation-]t[ime]`, `ci [culture-invariant]`, `d[escending]`, `m[ax-count]=`, `m[odified-]t[ime]`, `n[ame]`, `s[ize]`\. -##### `[-v|--verbosity] ` +##### `-u, --summary` + +Show summary at the end of search\. + +##### `-v, --verbosity ` The amount of information to display in the log\. diff --git a/docs/cli/replace-command.md b/docs/cli/replace-command.md index 1b138ffd..02bb4e2a 100644 --- a/docs/cli/replace-command.md +++ b/docs/cli/replace-command.md @@ -7,33 +7,45 @@ Searches the file system for files and replaces its content\. ## Synopsis ``` -orang replace [] -[ --ask] -[-a|--attributes] -[-b|--attributes-to-skip] - -c|--content [] -[-y|--display] -[-d|--dry-run] -[ --encoding] -[-e|--extension] EXT1[,EXT2] [] -[-h|--help] -[-t|--highlight] -[-i|--include-directory] [] -[ --input] [] -[ --interactive] -[-m|--max-count] -[ --modify] -[-n|--name] [] -[ --no-recurse] -[-o|--output] [] -[ --paths] -[ --paths-from] -[ --pipe] -[ --progress] -[-p|--properties] -[-r|--replacement] [] -[-s|--sort] -[-v|--verbosity] +orang replace + --after-context + --align-columns + --ask +-a, --attributes +-A, --attributes-to-skip + --before-context +-c, --content [] + --content-mode + --context + --count +-d, --dry-run + --encoding +-e, --extension EXT1[,EXT2] [] +-h, --help +-t, --highlight +-i, --include-directory [] + --input [] + --interactive + --line-number +-m, --max-count + --max-matches-in-file + --max-matching-files + --modify +-n, --name [] +-C, --no-content +-P, --no-path + --no-recurse +-o, --output [] + --path-mode + --paths + --paths-from + --pipe + --progress +-p, --properties +-r, --replacement [] +-s, --sort +-u, --summary +-v, --verbosity ``` ## Arguments @@ -44,131 +56,179 @@ Path to one or more files and/or directories that should be searched\. ## Options -##### `[--ask] ` +##### `--after-context ` + +Number of lines to show after matching line\. + +##### `--align-columns` + +Align columns\. + +##### `--ask ` Ask for permission after each file or value\. [\](OptionValues.md#ask_mode): `f[ile]`, `v[alue]`\. -##### `[-a|--attributes] ` +##### `-a, --attributes ` File attributes that are required\. [\](OptionValues.md#attributes): `archive`, `compressed`, `d[irectory]`, `e[mpty]`, `encrypted`, `f[ile]`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[-b|--attributes-to-skip] ` +##### `-A, --attributes-to-skip ` File attributes that should be skipped\. [\](OptionValues.md#attributes): `archive`, `compressed`, `e[mpty]`, `encrypted`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `-c|--content []` +##### `--before-context ` + +Number of lines to show before matching line\. + +##### `-c, --content []` Regular expression for files' content\. [\](OptionValues.md#pattern_options): `compiled`, `c[ulture-]i[nvariant]`, `e[cma-]s[cript]`, `e[nds-]w[ith]`, `e[quals]`, `n [explicit-capture]`, `f[rom-file]`, `i[gnore-case]`, `x [ignore-pattern-whitespace]`, `li[st]`, `length=`, `l[ist-]s[eparator]`, `l[iteral]`, `m[ultiline]`, `r[ight-to-left]`, `s[ingleline]`, `s[tarts-]w[ith]`, `timeout=`, `w[hole-]l[ine]`, `w[hole-word]`\. -##### `[-y|--display] ` +##### `--content-mode ` -Display of the results\. +Defines which parts of a content should be included in the results\. -[\](OptionValues.md#display_options): `c[ontent]=`[\](OptionValues.md#content_display), `co[ntext]=`, `b [context-before]=`, `a [context-after]=`, `c[ount]`, `c[reation-]t[ime]`, `indent=`, `l[ine-number]`, `m[odified-]t[ime]`, `no-align`, `p[ath]=`[\](OptionValues.md#path_display), `s[ize]`, `s[eparator]=`, `su[mmary]`, `trim-line`\. +[\](OptionValues.md#content_mode): `a[ll-lines]`, `l[ine]`, `u[nmatched-lines]`, `v[alue]`, `d [value-detail]`, `o[mit]`\. -##### `[-d|--dry-run]` +##### `--context ` + +Number of lines to show before and after matching line\. + +##### `--count` + +Show number of matches in a file\. + +##### `-d, --dry-run` Display which files should be updated but do not actually update any file\. -##### `[--encoding] ` +##### `--encoding ` Encoding to use when a file does not contain BOM\. Default encoding is UTF\-8\. -##### `[-e|--extension] EXT1[,EXT2] []` +##### `-e, --extension EXT1[,EXT2] []` A filter for file extensions \(case\-insensitive by default\)\. [\](OptionValues.md#extension_options): `c[ase-]s[ensitive]`, `c[ulture-]i[nvariant]`, `f[rom-file]`, `l[ist-]s[eparator]`, `l[iteral]`, `ne[gative]`, `timeout=`\. -##### `[-h|--help]` +##### `-h, --help` Show command line help\. -##### `[-t|--highlight] ` +##### `-t, --highlight ` Parts of the output to highlight\. [\](OptionValues.md#highlight): `n[one]`, `m[atch]`, `r[eplacement]`, `e[mpty-]m[atch]`, `e[mpty-]r[eplacement]`, `e[mpty]`, `b[oundary]`, `t[ab]`, `c[arriage-]r[eturn]`, `l[ine]f[eed]`, `newline`, `space`\. -##### `[-i|--include-directory] []` +##### `-i, --include-directory []` Regular expression for a directory name\. -##### `[--input] []` +##### `--input []` The input string to be searched\. -##### `[--interactive]` +##### `--interactive` Enable editing of a replacement\. -##### `[-m|--max-count] ` +##### `--line-number` + +Include line number\. + +##### `-m, --max-count ` Stop searching after specified number is reached\. -[\](OptionValues.md#max_options): ``, `m[atches]=`\. +##### `--max-matches-in-file ` -##### `[--modify] ` +Stop searching in a file after specified number of matches is found\. + +##### `--max-matching-files ` + +Stop searching after specified number of files is found\. + +##### `--modify ` Functions to modify result\. [\](OptionValues.md#replace_modify): `ci [culture-invariant]`, `tl [to-lower]`, `tu [to-upper]`, `t[rim]`, `te [trim-end]`, `ts [trim-start]`\. -##### `[-n|--name] []` +##### `-n, --name []` Regular expression for file or directory name\. -##### `[--no-recurse]` +##### `-C, --no-content` + +A shortcut for '\-\-content\-mode omit'\. + +##### `-P, --no-path` + +A shortcut for '\-\-path\-mode omit'\. + +##### `--no-recurse` Do not search subdirectories\. -##### `[-o|--output] []` +##### `-o, --output []` Path to a file that should store output\. -##### `[--paths] ` +##### `--path-mode ` + +Defines which part of a path should be included in the results\. + +[\](OptionValues.md#path_mode): `f[ull]`, `r[elative]`, `m[atch]`, `o[mit]`\. + +##### `--paths ` Path to one or more files and/or directories that should be searched\. -##### `[--paths-from] ` +##### `--paths-from ` Read the list of paths to search from a file\. Paths should be separated by newlines\. -##### `[--pipe] ` +##### `--pipe ` Defines how to use redirected/piped input\. [\](OptionValues.md#pipe_mode): `t[ext]`, `p[aths]`\. -##### `[--progress]` +##### `--progress` Display dot \(\.\) for every hundredth searched file or directory\. -##### `[-p|--properties] ` +##### `-p, --properties ` -A filter for file properties\. +Display file's properties and optionally filter by that properties\. -[\](OptionValues.md#file_properties): `c[reation-]t[ime]`, `m[odified-]t[ime]`, `s[ize]=`\. +[\](OptionValues.md#file_properties): `c[reation-]t[ime][=]`, `m[odified-]t[ime][=]`, `s[ize][=]`\. -##### `[-r|--replacement] []` +##### `-r, --replacement []` Replacement pattern\. -##### `[-s|--sort] ` +##### `-s, --sort ` Sort matched files and directories\. [\](OptionValues.md#sort_options): `a[scending]`, `c[reation-]t[ime]`, `ci [culture-invariant]`, `d[escending]`, `m[ax-count]=`, `m[odified-]t[ime]`, `n[ame]`, `s[ize]`\. -##### `[-v|--verbosity] ` +##### `-u, --summary` + +Show summary at the end of search\. + +##### `-v, --verbosity ` The amount of information to display in the log\. diff --git a/docs/cli/spellcheck-command.md b/docs/cli/spellcheck-command.md index 98c1ef2e..89a782a2 100644 --- a/docs/cli/spellcheck-command.md +++ b/docs/cli/spellcheck-command.md @@ -7,34 +7,47 @@ Searches the files' content for potential misspellings and typos\. ## Synopsis ``` -orang spellcheck [] -[ --ask] -[-a|--attributes] -[-b|--attributes-to-skip] -[ --case-sensitive] -[-c|--content] [] -[-y|--display] -[-d|--dry-run] -[ --encoding] -[-e|--extension] EXT1[,EXT2] [] -[-h|--help] -[-t|--highlight] -[-i|--include-directory] [] -[ --input] [] -[ --interactive] -[-m|--max-count] -[ --min-word-length] -[-n|--name] [] -[ --no-recurse] -[-o|--output] [] -[ --paths] -[ --paths-from] -[ --pipe] -[ --progress] -[-p|--properties] -[-s|--sort] -[-v|--verbosity] - --words +orang spellcheck + --after-context + --align-columns + --ask +-a, --attributes +-A, --attributes-to-skip + --before-context + --case-sensitive +-c, --content [] + --content-mode + --context + --count +-d, --dry-run + --encoding +-e, --extension EXT1[,EXT2] [] +-h, --help +-t, --highlight +-i, --include-directory [] + --input [] + --interactive + --line-number +-m, --max-count + --max-matches-in-file + --max-matching-files + --max-word-length + --min-word-length +-n, --name [] +-C, --no-content +-P, --no-path + --no-recurse +-o, --output [] + --path-mode + --paths + --paths-from + --pipe + --progress +-p, --properties +-s, --sort +-u, --summary +-v, --verbosity + --words ``` ## Arguments @@ -45,129 +58,181 @@ Path to one or more files and/or directories that should be searched\. ## Options -##### `[--ask] ` +##### `--after-context ` + +Number of lines to show after matching line\. + +##### `--align-columns` + +Align columns\. + +##### `--ask ` Ask for permission after each file or value\. [\](OptionValues.md#ask_mode): `f[ile]`, `v[alue]`\. -##### `[-a|--attributes] ` +##### `-a, --attributes ` File attributes that are required\. [\](OptionValues.md#attributes): `archive`, `compressed`, `d[irectory]`, `e[mpty]`, `encrypted`, `f[ile]`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[-b|--attributes-to-skip] ` +##### `-A, --attributes-to-skip ` File attributes that should be skipped\. [\](OptionValues.md#attributes): `archive`, `compressed`, `e[mpty]`, `encrypted`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[--case-sensitive]` +##### `--before-context ` + +Number of lines to show before matching line\. + +##### `--case-sensitive` Specifies case\-sensitive matching\. -##### `[-c|--content] []` +##### `-c, --content []` Regular expression for files' content\. [\](OptionValues.md#pattern_options): `compiled`, `c[ulture-]i[nvariant]`, `e[cma-]s[cript]`, `e[nds-]w[ith]`, `e[quals]`, `n [explicit-capture]`, `f[rom-file]`, `i[gnore-case]`, `x [ignore-pattern-whitespace]`, `li[st]`, `length=`, `l[ist-]s[eparator]`, `l[iteral]`, `m[ultiline]`, `r[ight-to-left]`, `s[ingleline]`, `s[tarts-]w[ith]`, `timeout=`, `w[hole-]l[ine]`, `w[hole-word]`\. -##### `[-y|--display] ` +##### `--content-mode ` + +Defines which parts of a content should be included in the results\. -Display of the results\. +[\](OptionValues.md#content_mode): `a[ll-lines]`, `l[ine]`, `u[nmatched-lines]`, `v[alue]`, `d [value-detail]`, `o[mit]`\. -[\](OptionValues.md#display_options): `c[ontent]=`[\](OptionValues.md#content_display), `co[ntext]=`, `b [context-before]=`, `a [context-after]=`, `c[ount]`, `c[reation-]t[ime]`, `indent=`, `l[ine-number]`, `m[odified-]t[ime]`, `no-align`, `p[ath]=`[\](OptionValues.md#path_display), `s[ize]`, `s[eparator]=`, `su[mmary]`, `trim-line`\. +##### `--context ` -##### `[-d|--dry-run]` +Number of lines to show before and after matching line\. + +##### `--count` + +Show number of matches in a file\. + +##### `-d, --dry-run` Display which files should be updated but do not actually update any file\. -##### `[--encoding] ` +##### `--encoding ` Encoding to use when a file does not contain BOM\. Default encoding is UTF\-8\. -##### `[-e|--extension] EXT1[,EXT2] []` +##### `-e, --extension EXT1[,EXT2] []` A filter for file extensions \(case\-insensitive by default\)\. [\](OptionValues.md#extension_options): `c[ase-]s[ensitive]`, `c[ulture-]i[nvariant]`, `f[rom-file]`, `l[ist-]s[eparator]`, `l[iteral]`, `ne[gative]`, `timeout=`\. -##### `[-h|--help]` +##### `-h, --help` Show command line help\. -##### `[-t|--highlight] ` +##### `-t, --highlight ` Parts of the output to highlight\. [\](OptionValues.md#highlight): `n[one]`, `m[atch]`, `r[eplacement]`, `e[mpty-]m[atch]`, `e[mpty-]r[eplacement]`, `e[mpty]`, `b[oundary]`, `t[ab]`, `c[arriage-]r[eturn]`, `l[ine]f[eed]`, `newline`, `space`\. -##### `[-i|--include-directory] []` +##### `-i, --include-directory []` Regular expression for a directory name\. -##### `[--input] []` +##### `--input []` The input string to be searched\. -##### `[--interactive]` +##### `--interactive` Enable editing of a replacement\. -##### `[-m|--max-count] ` +##### `--line-number` + +Include line number\. + +##### `-m, --max-count ` Stop searching after specified number is reached\. -[\](OptionValues.md#max_options): ``, `m[atches]=`\. +##### `--max-matches-in-file ` + +Stop searching in a file after specified number of matches is found\. -##### `[--min-word-length]` +##### `--max-matching-files ` + +Stop searching after specified number of files is found\. + +##### `--max-word-length` + +Specifies maximal word length to be checked\. + +##### `--min-word-length` Specifies minimal word length to be checked\. Default value is 3\. -##### `[-n|--name] []` +##### `-n, --name []` Regular expression for file or directory name\. -##### `[--no-recurse]` +##### `-C, --no-content` + +A shortcut for '\-\-content\-mode omit'\. + +##### `-P, --no-path` + +A shortcut for '\-\-path\-mode omit'\. + +##### `--no-recurse` Do not search subdirectories\. -##### `[-o|--output] []` +##### `-o, --output []` Path to a file that should store output\. -##### `[--paths] ` +##### `--path-mode ` + +Defines which part of a path should be included in the results\. + +[\](OptionValues.md#path_mode): `f[ull]`, `r[elative]`, `m[atch]`, `o[mit]`\. + +##### `--paths ` Path to one or more files and/or directories that should be searched\. -##### `[--paths-from] ` +##### `--paths-from ` Read the list of paths to search from a file\. Paths should be separated by newlines\. -##### `[--pipe] ` +##### `--pipe ` Defines how to use redirected/piped input\. [\](OptionValues.md#pipe_mode): `t[ext]`, `p[aths]`\. -##### `[--progress]` +##### `--progress` Display dot \(\.\) for every hundredth searched file or directory\. -##### `[-p|--properties] ` +##### `-p, --properties ` -A filter for file properties\. +Display file's properties and optionally filter by that properties\. -[\](OptionValues.md#file_properties): `c[reation-]t[ime]`, `m[odified-]t[ime]`, `s[ize]=`\. +[\](OptionValues.md#file_properties): `c[reation-]t[ime][=]`, `m[odified-]t[ime][=]`, `s[ize][=]`\. -##### `[-s|--sort] ` +##### `-s, --sort ` Sort matched files and directories\. [\](OptionValues.md#sort_options): `a[scending]`, `c[reation-]t[ime]`, `ci [culture-invariant]`, `d[escending]`, `m[ax-count]=`, `m[odified-]t[ime]`, `n[ame]`, `s[ize]`\. -##### `[-v|--verbosity] ` +##### `-u, --summary` + +Show summary at the end of search\. + +##### `-v, --verbosity ` The amount of information to display in the log\. diff --git a/docs/cli/sync-command.md b/docs/cli/sync-command.md index 09458290..4a1aedf9 100644 --- a/docs/cli/sync-command.md +++ b/docs/cli/sync-command.md @@ -7,31 +7,43 @@ Synchronizes content of two directories\. ## Synopsis ``` -orang sync [] -[ --ask] -[-a|--attributes] -[-b|--attributes-to-skip] -[ --compare] -[ --conflict] -[-c|--content] [] -[-y|--display] -[-d|--dry-run] -[ --encoding] -[-e|--extension] EXT1[,EXT2] [] -[-h|--help] -[-t|--highlight] -[-i|--include-directory] [] -[-m|--max-count] -[-n|--name] [] -[ --no-recurse] -[-o|--output] [] -[ --paths] -[ --paths-from] -[ --progress] -[-p|--properties] -[ --second] -[-s|--sort] -[-v|--verbosity] +orang sync + --after-context + --align-columns + --ask +-a, --attributes +-A, --attributes-to-skip + --before-context + --compare + --conflict +-c, --content [] + --content-mode + --context + --count +-d, --dry-run + --encoding +-e, --extension EXT1[,EXT2] [] +-h, --help +-t, --highlight +-i, --include-directory [] + --line-number +-m, --max-count + --max-matches-in-file + --max-matching-files +-n, --name [] +-C, --no-content +-P, --no-path + --no-recurse +-o, --output [] + --path-mode + --paths + --paths-from + --progress +-p, --properties + --second +-s, --sort +-u, --summary +-v, --verbosity ``` ## Arguments @@ -42,121 +54,169 @@ Path to a first directory to be synchronized and optionally a second directory\. ## Options -##### `[--ask]` +##### `--after-context ` + +Number of lines to show after matching line\. + +##### `--align-columns` + +Align columns\. + +##### `--ask` Ask for a permission to synchronize file or directory\. -##### `[-a|--attributes] ` +##### `-a, --attributes ` File attributes that are required\. [\](OptionValues.md#attributes): `archive`, `compressed`, `d[irectory]`, `e[mpty]`, `encrypted`, `f[ile]`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[-b|--attributes-to-skip] ` +##### `-A, --attributes-to-skip ` File attributes that should be skipped\. [\](OptionValues.md#attributes): `archive`, `compressed`, `e[mpty]`, `encrypted`, `h[idden]`, `normal`, `offline`, `r[ead-only]`, `r[eparse-]p[oint]`, `s[ystem]`, `temporary`\. -##### `[--compare] ` +##### `--before-context ` + +Number of lines to show before matching line\. + +##### `--compare ` File properties to be compared\. [\](OptionValues.md#compare_options): `n[one]`, `a[ttributes]`, `c[ontent]`, `m[odified-]t[ime]`, `s[ize]`\. -##### `[--conflict] ` +##### `--conflict ` Action to choose if a file or directory exists in one directory and it is missing in the second directory\. [\](OptionValues.md#sync_conflict_resolution): `a[sk]`, `f[irst-wins]`, `s[econd-wins]`\. -##### `[-c|--content] []` +##### `-c, --content []` Regular expression for files' content\. [\](OptionValues.md#pattern_options): `compiled`, `c[ulture-]i[nvariant]`, `e[cma-]s[cript]`, `e[nds-]w[ith]`, `e[quals]`, `n [explicit-capture]`, `f[rom-file]`, `g[roup]=`, `i[gnore-case]`, `x [ignore-pattern-whitespace]`, `li[st]`, `length=`, `l[ist-]s[eparator]`, `l[iteral]`, `m[ultiline]`, `ne[gative]`, `r[ight-to-left]`, `s[ingleline]`, `s[tarts-]w[ith]`, `timeout=`, `w[hole-]l[ine]`, `w[hole-word]`\. -##### `[-y|--display] ` +##### `--content-mode ` -Display of the results\. +Defines which parts of a content should be included in the results\. -[\](OptionValues.md#display_options): `c[ontent]=`[\](OptionValues.md#content_display), `co[ntext]=`, `b [context-before]=`, `a [context-after]=`, `c[ount]`, `c[reation-]t[ime]`, `indent=`, `l[ine-number]`, `m[odified-]t[ime]`, `no-align`, `p[ath]=`[\](OptionValues.md#path_display), `s[ize]`, `s[eparator]=`, `su[mmary]`, `trim-line`\. +[\](OptionValues.md#content_mode): `a[ll-lines]`, `l[ine]`, `u[nmatched-lines]`, `v[alue]`, `d [value-detail]`, `o[mit]`\. -##### `[-d|--dry-run]` +##### `--context ` + +Number of lines to show before and after matching line\. + +##### `--count` + +Show number of matches in a file\. + +##### `-d, --dry-run` Display which files or directories should be copied/deleted but do not actually copy/delete any file or directory\. -##### `[--encoding] ` +##### `--encoding ` Encoding to use when a file does not contain BOM\. Default encoding is UTF\-8\. -##### `[-e|--extension] EXT1[,EXT2] []` +##### `-e, --extension EXT1[,EXT2] []` A filter for file extensions \(case\-insensitive by default\)\. [\](OptionValues.md#extension_options): `c[ase-]s[ensitive]`, `c[ulture-]i[nvariant]`, `f[rom-file]`, `l[ist-]s[eparator]`, `l[iteral]`, `ne[gative]`, `timeout=`\. -##### `[-h|--help]` +##### `-h, --help` Show command line help\. -##### `[-t|--highlight] ` +##### `-t, --highlight ` Parts of the output to highlight\. [\](OptionValues.md#highlight): `n[one]`, `m[atch]`, `e[mpty-]m[atch]`, `e[mpty]`, `b[oundary]`, `t[ab]`, `c[arriage-]r[eturn]`, `l[ine]f[eed]`, `newline`, `space`\. -##### `[-i|--include-directory] []` +##### `-i, --include-directory []` Regular expression for a directory name\. -##### `[-m|--max-count] ` +##### `--line-number` + +Include line number\. + +##### `-m, --max-count ` Stop searching after specified number is reached\. -[\](OptionValues.md#max_options): ``, `m[atches]=`\. +##### `--max-matches-in-file ` -##### `[-n|--name] []` +Stop searching in a file after specified number of matches is found\. + +##### `--max-matching-files ` + +Stop searching after specified number of files is found\. + +##### `-n, --name []` Regular expression for file or directory name\. -##### `[--no-recurse]` +##### `-C, --no-content` + +A shortcut for '\-\-content\-mode omit'\. + +##### `-P, --no-path` + +A shortcut for '\-\-path\-mode omit'\. + +##### `--no-recurse` Do not search subdirectories\. -##### `[-o|--output] []` +##### `-o, --output []` Path to a file that should store output\. -##### `[--paths] ` +##### `--path-mode ` + +Defines which part of a path should be included in the results\. + +[\](OptionValues.md#path_mode): `f[ull]`, `r[elative]`, `m[atch]`, `o[mit]`\. + +##### `--paths ` Path to one or more files and/or directories that should be searched\. -##### `[--paths-from] ` +##### `--paths-from ` Read the list of paths to search from a file\. Paths should be separated by newlines\. -##### `[--progress]` +##### `--progress` Display dot \(\.\) for every hundredth searched file or directory\. -##### `[-p|--properties] ` +##### `-p, --properties ` -A filter for file properties\. +Display file's properties and optionally filter by that properties\. -[\](OptionValues.md#file_properties): `c[reation-]t[ime]`, `m[odified-]t[ime]`, `s[ize]=`\. +[\](OptionValues.md#file_properties): `c[reation-]t[ime][=]`, `m[odified-]t[ime][=]`, `s[ize][=]`\. -##### `[--second] ` +##### `--second ` A directory to be synchronized with a first directory\. It can be also specified as a last unnamed parameter\. -##### `[-s|--sort] ` +##### `-s, --sort ` Sort matched files and directories\. [\](OptionValues.md#sort_options): `a[scending]`, `c[reation-]t[ime]`, `ci [culture-invariant]`, `d[escending]`, `m[ax-count]=`, `m[odified-]t[ime]`, `n[ame]`, `s[ize]`\. -##### `[-v|--verbosity] ` +##### `-u, --summary` + +Show summary at the end of search\. + +##### `-v, --verbosity ` The amount of information to display in the log\. diff --git a/src/CommandLine/CommandLine.csproj b/src/CommandLine/CommandLine.csproj index 59817bd4..fb55954d 100644 --- a/src/CommandLine/CommandLine.csproj +++ b/src/CommandLine/CommandLine.csproj @@ -11,7 +11,7 @@ true orang Orang.DotNet.Cli - 0.2.2 + 0.3.0-rc Search, replace, rename and delete directories, files and its content using the power of .NET regular expressions. https://github.com/JosefPihrt/Orang Apache-2.0 diff --git a/src/CommandLine/PackageInfo.cs b/src/CommandLine/PackageInfo.cs index 6bce510a..94e81827 100644 --- a/src/CommandLine/PackageInfo.cs +++ b/src/CommandLine/PackageInfo.cs @@ -4,6 +4,6 @@ namespace Orang.CommandLine { internal static class PackageInfo { - public const string Version = "0.2.2"; + public const string Version = "0.3.0-rc"; } } diff --git a/src/Directory.Build.props b/src/Directory.Build.props index ec09558c..13954724 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,7 +1,7 @@  - 0.2.2.0 + 0.3.0.0 $(MSBuildThisFileDirectory)global.ruleset 9.0 true diff --git a/src/FileSystem/FileSystem.csproj b/src/FileSystem/FileSystem.csproj index 5807658c..072adac5 100644 --- a/src/FileSystem/FileSystem.csproj +++ b/src/FileSystem/FileSystem.csproj @@ -9,7 +9,7 @@ Orang.FileSystem - 0.2.2 + 0.3.0-rc Search, replace, rename and delete directories, files and its content using the power of .NET regular expressions. https://github.com/JosefPihrt/Orang Apache-2.0 diff --git a/tools/build.cmd b/tools/build.cmd index 3e92ac9b..c6215a54 100644 --- a/tools/build.cmd +++ b/tools/build.cmd @@ -3,7 +3,7 @@ set _programFiles=%ProgramFiles(x86)% if not defined _programFiles set _programFiles=%ProgramFiles% -set _version=0.2.2 +set _version=0.3.0-rc orang replace -e cmd -c "(?<=--version )\d+\.\d+\.\d+(-\w+)?" -r "%_version%" diff --git a/tools/reinstall_tool.cmd b/tools/reinstall_tool.cmd index 368df0d7..9cbe0ee3 100644 --- a/tools/reinstall_tool.cmd +++ b/tools/reinstall_tool.cmd @@ -19,6 +19,6 @@ dotnet pack -c Release --no-build -v normal "..\src\CommandLine\CommandLine.cspr dotnet tool uninstall orang.dotnet.cli -g -dotnet tool install orang.dotnet.cli --version 0.2.2 -g --add-source "..\src\CommandLine\bin\Release" +dotnet tool install orang.dotnet.cli --version 0.3.0-rc -g --add-source "..\src\CommandLine\bin\Release" pause \ No newline at end of file diff --git a/tools/reinstall_tool_debug.cmd b/tools/reinstall_tool_debug.cmd index 7c86d805..f475288a 100644 --- a/tools/reinstall_tool_debug.cmd +++ b/tools/reinstall_tool_debug.cmd @@ -19,6 +19,6 @@ dotnet pack -c Debug --no-build -v normal "..\src\CommandLine\CommandLine.csproj dotnet tool uninstall orang.dotnet.cli -g -dotnet tool install orang.dotnet.cli --version 0.2.2 -g --add-source "..\src\CommandLine\bin\Debug" +dotnet tool install orang.dotnet.cli --version 0.3.0-rc -g --add-source "..\src\CommandLine\bin\Debug" pause \ No newline at end of file