import readline
-import rlcompleter
import os.path
from .config import *
try:
if begin == 0:
candidates = self.options.keys()
+ elif words[-1] in self.options[words[0]]:
+ candidates = []
else:
first = words[0]
candidates = self.options[first]
else:
self.current_candidates = candidates
- except (KeyError, IndexError), err:
+ except (KeyError, IndexError):
self.current_candidates = []
try:
"""
readline.set_completer(RainbowCompleter(d).complete)
readline.parse_and_bind('set editing-mode vi')
- readline.parse_and_bind("set input-meta on")
- readline.parse_and_bind("set convert-meta off")
- readline.parse_and_bind("set output-meta on")
+ readline.parse_and_bind('set show-all-if-ambiguous on')
+ readline.parse_and_bind('set show-all-if-unmodified on')
+ readline.parse_and_bind('set skip-completed-text on')
if 'libedit' in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete")
else:
d = dict(zip(
cmdset,
[
- ['public #', 'mine'], # switch
+ ['public', 'mine'], # switch
[], # home
['@'], # view
[], # tweet
[], # unfavorite
['#'], # search
['image'], # show image
- [], # follow
- [], # unfollow
+ ['@'], # follow
+ ['@'], # unfollow
[], # help
[], # clear
[], # quit