-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added separate readme for commandline usage & examples
- Loading branch information
DougTy
committed
Sep 30, 2015
1 parent
4bc21f2
commit 9686619
Showing
2 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Command Line Usage | ||
|
||
### Windows | ||
```subl --command "sbs_compare_files {\"A\":\"file1\", \"B\":\"file2\"}"``` | ||
Requires additional escaping of backslashes in file paths. | ||
|
||
**compare.bat** | ||
_Usage: compare.bat file1.txt file2.txt_ | ||
``` | ||
set file1=%~1 | ||
set file1=%file1:\=\\% | ||
set file2=%~2 | ||
set file2=%file2:\=\\% | ||
subl --command "sbs_compare_files {\"A\":\"%file1%\", \"B\":\"%file2%\"}" | ||
``` | ||
|
||
--- | ||
|
||
### Linux/OSX | ||
```subl --command 'sbs_compare_files {"A":"file1", "B":"file2"}'``` | ||
Untested on OSX, but should be the same as Linux. | ||
|
||
**compare.sh** | ||
_Usage: compare.sh file1.txt file2.txt_ | ||
``` | ||
#!/bin/sh | ||
eval subl3 --command \'sbs_compare_files {\"A\":\"$1\", \"B\":\"$2\"}\' | ||
``` |