-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added #d command line functionality. Also, d now takes stdin for mess…
…age.
- Loading branch information
1 parent
ad2da16
commit 25ddfe3
Showing
2 changed files
with
23 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# if we have stdin, let's prepend it to the message | ||
# if we have stdin, let's prepend it to the message for post | ||
if ARGV[0] && ARGV[0] == 'post' && !STDIN.tty? | ||
ARGV[1] = "#{STDIN.read}#{ARGV[1]}" | ||
end | ||
|
||
# if we have stdin, let's prepend it to the message for d | ||
if ARGV[0] && ARGV[0] == 'd' && !STDIN.tty? | ||
ARGV[2] = "#{STDIN.read}#{ARGV[2]}" | ||
end | ||
|
||
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib') | ||
require 'twitter' | ||
require 'twitter/cli' |
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