ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 31 Aug 2011 03:31:39 -0500Autocompletion of filenames in Sage notebookhttp://ask.sagemath.org/question/8287/autocompletion-of-filenames-in-sage-notebook/I'm working within a Sage notebook (not a terminal). The tab autocompletion for commands is lovely, but is there something similar for filenames and folders when you're loading/attaching?
For example, if I want to attach the file myscripts/folder123/example456.sage (assuming that 'myscripts' is in my load_attach_path), I would type:
attach folder123/example456.sage
If I were to type only a portion of that path and hit tab, it doesn't autocomplete or give completions for the folder or filename; it either does nothing, indents, or (e.g., after the "e" in "example123") brings up a list of commands, without listing any filenames. Is there anything I can do to change this?
Disclaimer: I'm very new to all this, and pretty Unix-incompetent.Tue, 23 Aug 2011 04:50:32 -0500http://ask.sagemath.org/question/8287/autocompletion-of-filenames-in-sage-notebook/Answer by niles for <p>I'm working within a Sage notebook (not a terminal). The tab autocompletion for commands is lovely, but is there something similar for filenames and folders when you're loading/attaching?</p>
<p>For example, if I want to attach the file myscripts/folder123/example456.sage (assuming that 'myscripts' is in my load_attach_path), I would type:</p>
<p>attach folder123/example456.sage</p>
<p>If I were to type only a portion of that path and hit tab, it doesn't autocomplete or give completions for the folder or filename; it either does nothing, indents, or (e.g., after the "e" in "example123") brings up a list of commands, without listing any filenames. Is there anything I can do to change this?</p>
<p>Disclaimer: I'm very new to all this, and pretty Unix-incompetent.</p>
http://ask.sagemath.org/question/8287/autocompletion-of-filenames-in-sage-notebook/?answer=11603#post-id-11603This is a fair question, and autocompletion of paths does work from the sage command line (because of ipython, I think). Unfortunately, no, there is no autocompletion in notebook cells.Tue, 23 Aug 2011 06:32:32 -0500http://ask.sagemath.org/question/8287/autocompletion-of-filenames-in-sage-notebook/?answer=11603#post-id-11603Comment by jdc for <p>This is a fair question, and autocompletion of paths does work from the sage command line (because of ipython, I think). Unfortunately, no, there is no autocompletion in notebook cells.</p>
http://ask.sagemath.org/question/8287/autocompletion-of-filenames-in-sage-notebook/?comment=21297#post-id-21297Belated thanks for your answer, Niles. So, is autocompletion in notebooks a cut-and-dried "No, and there is no fix, and there never will be"? Might not someone more clever than me find a way to implement this, or is there some unavoidable obstruction?Mon, 29 Aug 2011 07:48:11 -0500http://ask.sagemath.org/question/8287/autocompletion-of-filenames-in-sage-notebook/?comment=21297#post-id-21297Comment by jdc for <p>This is a fair question, and autocompletion of paths does work from the sage command line (because of ipython, I think). Unfortunately, no, there is no autocompletion in notebook cells.</p>
http://ask.sagemath.org/question/8287/autocompletion-of-filenames-in-sage-notebook/?comment=21292#post-id-21292Thanks again!Wed, 31 Aug 2011 03:31:39 -0500http://ask.sagemath.org/question/8287/autocompletion-of-filenames-in-sage-notebook/?comment=21292#post-id-21292Comment by niles for <p>This is a fair question, and autocompletion of paths does work from the sage command line (because of ipython, I think). Unfortunately, no, there is no autocompletion in notebook cells.</p>
http://ask.sagemath.org/question/8287/autocompletion-of-filenames-in-sage-notebook/?comment=21295#post-id-21295That, I'm afraid, I do not know. I wouldn't know how to do it, and I don't know if anyone is working in that direction. It probably doesn't require someone particularly clever, just someone who decides to make it happen :)Tue, 30 Aug 2011 02:58:23 -0500http://ask.sagemath.org/question/8287/autocompletion-of-filenames-in-sage-notebook/?comment=21295#post-id-21295