Skip to content

Commit 2d8f768

Browse files
committed
Merge pull request #71 from igorshubovych/os-shortcuts
Platforms shortcuts
2 parents e72b50e + e333929 commit 2d8f768

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

bin/tldr

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ program
1818
.option('-e, --random-example', 'Show a random example')
1919
.option('-f, --render [file]', 'Render a specific markdown [file]')
2020
.option('-o, --os [type]', 'Override the operating system [linux, osx, sunos]')
21+
.option('--linux', 'Override the operating system with Linux')
22+
.option('--osx', 'Override the operating system with OSX')
23+
.option('--sunos', 'Override the operating system with SunOS')
2124
//
2225
// CACHE MANAGEMENT
2326
//
@@ -47,6 +50,18 @@ program.on('--help', function() {
4750

4851
program.parse(process.argv);
4952

53+
if (program.linux) {
54+
program.os = 'linux';
55+
}
56+
57+
if (program.osx) {
58+
program.os = 'osx';
59+
}
60+
61+
if (program.sunos) {
62+
program.os = 'sunos';
63+
}
64+
5065
if (program.os) {
5166
var config = require('../lib/config');
5267
var platform = require('../lib/platform');

0 commit comments

Comments
 (0)