Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update

  • Loading branch information...
commit 61a6aeafdcc369c641ccc097cc2074be8c2eb0ab 1 parent e23fe60
Nicholas Kinsey authored
View
1  .gitignore
@@ -0,0 +1 @@
+/node_modules/
View
26 bin/tag.coffee
@@ -7,7 +7,8 @@ VERSION = '1.0.0'
path = require 'path'
CoffeeScript = require 'coffee-script'
-{OptionParser} = require 'coffee-script/optparse'
+# {OptionParser} = require 'coffee-script/optparse'
+optimist = require('../node_modules/optimist')
{puts} = require 'sys'
@@ -18,24 +19,13 @@ usage = '''
tag [TITLE]
'''
-switches = [
- ['-h', '--help', 'Displays this snazzy help message']
-
- ['-v', '--version', 'Display tag version']
-]
+argv = optimist.usage(usage).argv
-parser = new OptionParser switches
-options = parser.parse process.argv[2..]
-args = options.arguments
+log VERSION if argv.version
-delete options.arguments
-
-log parser.help() if options.help
-log VERSION if options.version
-
-if args.length <= 0
- args.push path.basename(process.cwd())
-
-tag = args[0]
+if argv._.length is 0
+ tag = path.basename(process.cwd())
+else
+ tag = argv._[0]
puts '\033]0;' + tag + '\007'
View
10 package.coffee
@@ -6,7 +6,7 @@ keywords: ['tag', 'title', 'terminal', 'osx', 'window', 'name']
version: '1.0.0'
-author: 'Feisty Studios <tag@feistystudios.com> (http://feistystudios.com/)'
+author: 'feisty <tag@feisty.co> (http://feisty.co/)'
licenses: [
type: 'FEISTY'
@@ -28,10 +28,12 @@ bugs:
bin:
tag: './bin/tag.coffee'
-main: 'tag'
+main: 'tag.coffee'
dependencies:
- 'coffee-script': '>= 1.0.0'
+ 'coffee-script': '>= 1.1.1 < 1.2'
+ optimist: '>= 0.2.4 < 0.3'
engines:
- node: '*'
+ node: '>= 0.4.8 < 0.5'
+ npm: '>= 1.0.13 < 1.1'
View
59 package.json
@@ -1,34 +1,45 @@
{
- name: 'tag',
- description: 'window/tab titles for Terminal.app',
- keywords: ['tag', 'title', 'terminal', 'osx', 'window', 'name'],
- version: '1.0.0',
- author: 'Feisty Studios <tag@feistystudios.com> (http://feistystudios.com/)',
- licenses: [
+ "name": "tag",
+ "description": "window/tab titles for Terminal.app",
+ "keywords": [
+ "tag",
+ "title",
+ "terminal",
+ "osx",
+ "window",
+ "name"
+ ],
+ "version": "1.0.0",
+ "author": "feisty <tag@feisty.co> (http://feisty.co/)",
+ "licenses": [
{
- type: 'FEISTY',
- url: 'http://github.com/feisty/license/raw/master/LICENSE'
+ "type": "FEISTY",
+ "url": "http://github.com/feisty/license/raw/master/LICENSE"
}
],
- contributors: ['Nicholas Kinsey <nicholas.kinsey@feistystudios.com>'],
- repository: {
- type: 'git',
- url: 'http://github.com/feisty/tag.git',
- private: 'git@github.com:feisty/tag.git',
- web: 'http://github.com/feisty/tag'
+ "contributors": [
+ "Nicholas Kinsey <nicholas.kinsey@feistystudios.com>"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/feisty/tag.git",
+ "private": "git@github.com:feisty/tag.git",
+ "web": "http://github.com/feisty/tag"
},
- bugs: {
- mail: 'tag@feistystudios.com',
- web: 'http://github.com/feisty/tag/issues'
+ "bugs": {
+ "mail": "tag@feistystudios.com",
+ "web": "http://github.com/feisty/tag/issues"
},
- bin: {
- tag: './bin/tag.coffee'
+ "bin": {
+ "tag": "./bin/tag.coffee"
},
- main: 'tag',
- dependencies: {
- 'coffee-script': '>= 1.0.0'
+ "main": "tag.coffee",
+ "dependencies": {
+ "coffee-script": ">= 1.1.1 < 1.2",
+ "optimist": ">= 0.2.4 < 0.3"
},
- engines: {
- node: '*'
+ "engines": {
+ "node": ">= 0.4.8 < 0.5",
+ "npm": ">= 1.0.13 < 1.1"
}
}
View
0  tag.coffee
No changes.
Please sign in to comment.
Something went wrong with that request. Please try again.