Ask Your Question

How to literally print the output of tab completion in the command line?

asked 2017-02-06 11:17:02 +0200

jipilab gravatar image

Some time ago, I realized that pressing tab after a "." in the command line opens a new window where it is possible to scroll through the possible methods to call on this object.

Is it still possible to print inside the terminal all the possibilities?

Even if I modify the preferences of the command line from "readline" to "multicolumns", it still does not show much of the possibilities and sometimes seeing all of them at once is faster than scrolling.

Is it possible to get this feature back as before somehow?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2017-02-06 15:06:21 +0200

tmonteil gravatar image

The answer is yes, see some more details on this answer :

edit flag offensive delete link more

answered 2017-02-06 17:08:49 +0200

If you want an actual Python list of the possibilities, you can do something like this:

sage: shell = get_ipython()  # the IPython 'shell', which handles completion
sage: s = 'hello'
sage: shell.complete('s.r')
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-02-06 11:17:02 +0200

Seen: 540 times

Last updated: Feb 06 '17