Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnstevenson committed Aug 14, 2018
1 parent cc39aaa commit bde2fb1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
16 changes: 10 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
## [Unreleased]
### Added
- This ChangeLog.

## [1.1.0] - 2018-08-14
* Added: `escapeCommand` method, taking an array of arguments that includes the executable.
* Added: optional `module` argument to improve edge-case escaping for the executable.
* Fixed: replaced `escapeshellarg` usage to avoid locale problems.
* Fixed: continual updates to use Chocolatey with appveyor.

## 1.0.0 - 2016-08-04
### Added
- First release
## [1.0.0] - 2016-08-04
* Initial release

[Unreleased]: https://github.com/johnstevenson/winbox-args/compare/v1.0.0...HEAD
[Unreleased]: https://github.com/johnstevenson/winbox-args/compare/v1.1.0...HEAD
[1.1.0]: https://github.com/johnstevenson/winbox-args/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/johnstevenson/winbox-args/compare/a6a5783f708a...v1.0.0
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ Winbox-Args
[![Build Status](https://travis-ci.org/johnstevenson/winbox-args.svg?branch=master)](https://travis-ci.org/johnstevenson/winbox-args)
[![Build status](https://ci.appveyor.com/api/projects/status/p4k75qqcyioj0mfl?svg=true)](https://ci.appveyor.com/project/johnstevenson/winbox-args)

A PHP function to escape command-line arguments, which on Windows replaces `escapeshellarg` with a more robust method. Install from [Packagist][packagist] and use it like this:
A PHP function to escape command-line arguments, which replaces `escapeshellarg` with more robust methods for both Windows and non-Windows platforms. Install from [Packagist][packagist] and use it like this:

```php
$escaped = Winbox\Args::escape($argument);
```

Alternatively, you can just [copy the code][function] into your own project (but please keep the license attribution and documentation link).

### What it does
### What it does on the Windows platform
The following transformations are made:

* Double-quotes are escaped with a backslash, with any preceeding backslashes doubled up.
Expand All @@ -34,6 +34,9 @@ There are some limitations:

See [How cmd.exe parses a command](https://github.com/johnstevenson/winbox-args/wiki/How-cmd.exe-parses-a-command) and [Implementing a solution](https://github.com/johnstevenson/winbox-args/wiki/Implementing-a-solution) for more information.

### What it does on non-Windows platforms
The argument is enclosed is single-quotes, with internal single-quotes escaped.

### Is that it?
Yup. An entire repo for a tiny function. However, it needs quite a lot of explanation because:

Expand Down

0 comments on commit bde2fb1

Please sign in to comment.