Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Replying, retweeting, liking, DMs

edison23 edited this page Jan 22, 2016 · 1 revision

After a bit of time using oysttyer, you will have noticed the a letter-number code on the left of every tweet. This is the tweet's menu code. The letter ranges from a-z and the number from 0-9, with tweets za0-zz9 reserved for temporary menus the foreground process constructs (zz0-zz9 always reserved for thread requests).

That sounded a little dizzying, so I think an example will be the best way to show how to use this effectively. As your timeline moves along, say there is a tweet you want to reply to. You could simply use @username, but this does not thread your reply (there is no 'reply to'). Instead, the /reply command can take a menu code and you can then tell oysttyer the exact tweet you are referencing. For example,

h2> <ev> I am so awesome. You all want me. #eviswanted
h3> <oysttyer> Version 16.0.9 will enable world domination.
oysttyer> /re h3 I would like very much to dominate the planet.
(expanded to "@oysttyer I would like very much to dominate the planet.")
oysttyer> h4> <@floodgap> @oysttyer I would like very much to dominate the planet.

Notice that your reply appeared with its own menu code (so you can reference your own tweets), that the reply had the correctly referenced screen name added for you (you don't need to retype that), and that your tweet appeared with a @ before your screen name. The @ means that your tweet is now part of a thread (i.e., it has "reply to" information attached to it). If you asked oysttyer for the thread it belongs to using the /thread command, you would get

oysttyer> /th h4
zz0> <oysttyer> Version 16.0.9 will enable world domination.
zz1> <@floodgap> @oysttyer I would like very much to dominate the planet.

(up to 10 tweets in a thread can be retrieved, if it's that long), ending with the tweet you asked to have threaded.

Notice that the menu codes are different. Any collection of tweets requested by your command uses special menu codes constructed just for those tweets. For example, if you asked for your mentions-replies, you might see

h5> <@oysttyer> @floodgap I like your world domination code.
oysttyer> /re
za0> <@oysttyer> @floodgap I like your world domination code.
za1> <cbqueue> Waiting for @floodgap to hack into my wireless.
za2> <@floodgap> @oysttyer We have fired you for being too awesome. Please see HR.

Then you can see the threads that any of those belong to:

oysttyer> /th za0
zz0> <oysttyer> Version 16.0.9 will enable world domination.
zz1> <@floodgap> @oysttyer I would like very much to dominate the planet.
zz2> <@oysttyer> @floodgap I like your world domination code.
oysttyer> /th za2
zz0> <oysttyer> I have converted lead, puppy poop and rubber bands into gold. I am awesome.
zz1> <@floodgap> @oysttyer We have fired you for being too awesome. Please see HR.

Replies and mentions (with /replies), asking for a user's tweets (/again username) and searches all create foreground menu codes starting with z. These roll forward from za0 to zy9; when the foreground process runs out of menu codes, it simply wraps around (viz., after zy9 comes za0 again).

Threads occupy their own special temporary menu from zz0-zz9 so that you don't have to keep grabbing, say, your replies when you want to look at a whole bunch of threads. In fact, that is exactly what we did above. Each time you request a new thread, the previous thread menu is destroyed and a new set of codes generated. If you try to access a tweet that has gone out of scope, you simply get an error message. For example, we made a new temporary thread menu when we asked for the second thread. To prove this,

oysttyer> /re zz2 I will E-mail my world domination code update to you.
-- no such tweet (yet?): zz2

Likewise, because you are always receiving new tweets, the background menu codes also roll forward, viz., after tweet y9 comes a0 again. This means that the background has a "memory" of 250 tweets, after which the tweet is removed from the backlog. Don't worry: if you should miss the chance to reference a tweet, you can still get a temporary menu code by calling up that user's tweets (or your replies) and referencing that tweet that way using a foreground menu code.

If you don't know if a tweet still exists, don't fret. Whatever is the most recently displayed tweet with that code is always the tweet it will reference.

Deletion (/delete), retweets (/retweet, /eretweet and /fretweet), marking and unmarking likes (former favorites) (/like, /unlike and /fretweet), dumping tweets (/dump), dumping entities (/entities) and opening URLs (/url) also all take menu codes. The /url command opens all URLs in a tweet according to the current -urlopen setting; for example, try /set urlopen lynx -dump %U | more and then run /url on a tweet with URLs in it. Mac OS X users, try /set urlopen open %U.

Note that /url will permit UTF-8 characters in URLs thanks to the proliferation of faddish shortners like tinyarro.ws, but some browsers don't understand them on the command line (in fact, Mac OS X's open will see these characters and think its argument is a filename, so caveat scriptor).

If you want to reply to everyone mentioned in the tweet, use /replyall.

If you want to make a visible reply everyone can see regardless of whether they follow the user you replied to, or regardless of their settings, you can use /vreply. This generates a tweet like r @username your reply, and threads it. Use sparingly to avoid annoying people.

/delete deletes your own tweets, after you confirm which tweet you have flagged for destruction. You cannot use it to erase another user's. Deletion is not guaranteed: even if oysttyer reports it received successful confirmation, it may be queued for later by Twitter internally, or it may not happen at all if Twitter is having database problems. If you're really prone to fatfingering your tweets, you might want to use the -verify or -slowpost options so you have a chance to catch mistaken tweets before they are sent. You can use /deletelast as a shortcut for deleting the most recently posted tweet in this session.

/retweet simply retweets the selected tweet as a NewRT (unless you specify -nonewrts). If you prefer an old-style retweet, you can use /oretweet, or tack on to the tweet; either way, the old tweet will be sent back out with RT @userwhosaidit: followed by the tweet (and any additional tail text if you specified it). If you want more flexibility to add your own commentary, you can use /eretweet, which loads the tweet into the substitution variable %RT% which can then be used at the beginning or end of a subsequent tweet. Here is an example of both in action:

s5> <floodgap> I am awesome
oysttyer> /rt s5
(expanded to "RT @floodgap: I am awesome")
oysttyer> /ert s5
-- ok, %RT% is now "RT @floodgap: I am awesome"
oysttyer> yes, you are %RT%
(expanded to "yes, you are RT @floodgap: I am awesome")
oysttyer> s7> <@oysttyer> yes, you are RT @floodgap: I am awesome

Note that NewRTs are marked with a % symbol. You can see who retweeted a tweet (whether it's yours or not) with /rtsof (or see which of your tweets were NewRT-ed with /rtsofme). Also note that NewRTs you make of people who already see in your timeline are not echoed again to you, but they will appear if you query yourself with /again.

If even this is not expressive enough for you, you can also edit %% with the usual substitution sequences (see Command history and substitution below), which is also populated by /eretweet. If you really enjoyed the post, then /fretweet will retweet and favourite the tweet for you all at the same time.

Direct messages also have their own menu codes. These three-character codes always start with the letter d, and are completely separate from each other (e.g., tweet code a5 is unrelated to DM code da5). For example, when you start up you might see

-- checking for most recent direct messages:
[DM da0][cbqueue/Fri Sep 28 02:01:33 +0000 2007] test test
[DM da1][oysttyer/Fri Sep 28 03:01:51 +0000 2007] don't forget to update the website

These codes can also be used to /reply (sending them a direct message reply), to /delete (deleting it from your direct message inbox), or for /url to extract URLs from, just like a tweet menu code would be. Instead of using the two-character tweet menu code, however, use the three-character DM menu code and "the right thing" (tm) will be done automagically:

oysttyer> /re da0 test test back atcha
(expanded to "/dm cbqueue test test back atcha")

Currently Twitter does not support threading for direct messages, so /thread cannot be used for DMs at present (and /reply to a direct message thus cannot thread it; in this version it acts merely as a convenient shortcut). Also, there is no /retweet for DMs. If you want to be like that, cut and paste yourself.

Like regular tweet menu codes, DM menu codes wrap around. There are no temporary menus for DMs, however; if you use /dmagain to redisplay your inbox, the codes simply keep advancing. Whatever is the last DM on screen with a particular DM menu code will always be referenceable by that code. Because there are no temporary menus, the range of DM codes is da0 through dz9, meaning a "memory" of 250 direct messages. You can always get them back with /dmagain.

If your /reply or /(e)retweet of a tweet (or, where allowed, a DM) ends up expanding over length, the usual automatic trimming or autosplitting applies with one important change: if you use %-substitution on the most recent tweet that is or originally was a reply or retweet, then the substituted tweet is also linked (see Command history and substitution). This allows things like autosplit or %-based line editing to work correctly and connect to the same thread. As soon as you type a new tweet or reference a new one, however, oysttyer may automatically purge it if it thinks you are no longer working with the selected tweet.

Anywhere that a menu code is accepted, you can also directly use that tweet or DM's ID, if you know it (for example, /dump 20). This is mostly useful for command-line scripting where you don't have a menu code, but still want to reference a particular tweet or DM. To distinguish DM IDs from tweet IDs, since they can overlap, put a d before the DM ID number.

Clone this wiki locally