Normally, this kind of problem is *very* connected to the OS, and terminal emulator, that you are using. The problems you mention deal with "curses/ncurses" library behavior and TERMCAP/TERMINFO databases; and to some extent, with interrupt handling. To some extent, the problems arise from "confused state" in the emulator, which can arise either from a mismatch between kernel and emulator state, or from bugs in either the emulator or terminal description. Sometimes, changing the value of the TERM environment variable can ease the problems (but that takes a lot experimentation and patience).
On Mac OS X/Terminal, you should be able to recover "normal" behavior by doing a full terminal reset (Shell -> Send Hard Reset). Other systems/emulators should have similar functionality.
What system(s) are you using?
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Director
Institute for the Enhancement of the Director's Income
--------
"Weaseling out of things is what separates us from the animals.
Well, except the weasel."
- Homer J Simpson
--------
Normally, this kind of problem is *very* connected to the OS, and terminal emulator, that you are using. The problems you mention deal with "curses/ncurses" library behavior and TERMCAP/TERMINFO databases; and to some extent, with interrupt handling. To some extent, the problems arise from "confused state" in the emulator, which can arise either from a mismatch between kernel and emulator state, or from bugs in either the emulator or terminal description. Sometimes, changing the value of the TERM environment variable can ease the problems (but that takes a lot experimentation and patience).
On 10 Feb, 2012, at 02:06 AM, Jonathan Bober wrote:
> By "sage in terminal" I mean "not the notebook."
>
> In recent builds (maybe mostly in the sage-5.0-beta series, but maybe 4.8, and maybe older -- I know that's not too helpful) I've occasionally noticed weird things working with sage from the command line. Sometimes tab completion has just completely or mostly stopped working until I quit and restart, and now after hitting CTRL-c I have a terminal where the behavior of pressing "up" has just changed.
>
> Normally if I start typing 'G = ', and then hit the up arrow, it will take me to the previous spot where I started a line this way. (I used to _hate_ this behavior, and now I can't live without it.) Now, after hitting CTRL-c in the middle of typing a command (to just erase the whole thing), I find the behavior has changed, so that when I hit up it just takes me to the previous line.
>
> Anyone have any idea what's going on? It's not a big deal, but it seems to be a strange bug, and annoys me sometimes.
On Mac OS X/Terminal, you should be able to recover "normal" behavior by doing a full terminal reset (Shell -> Send Hard Reset). Other systems/emulators should have similar functionality.
What system(s) are you using?
Justin
>
>
> On Fri, Feb 10, 2012 at 10:58 AM, Justin C. Walker <jus...@mac.com> wrote:
>
> On 10 Feb, 2012, at 02:06 AM, Jonathan Bober wrote:
>
> > By "sage in terminal" I mean "not the notebook."
> >
> > In recent builds (maybe mostly in the sage-5.0-beta series, but maybe 4.8, and maybe older -- I know that's not too helpful) I've occasionally noticed weird things working with sage from the command line. Sometimes tab completion has just completely or mostly stopped working until I quit and restart, and now after hitting CTRL-c I have a terminal where the behavior of pressing "up" has just changed.
> >
> > Normally if I start typing 'G = ', and then hit the up arrow, it will take me to the previous spot where I started a line this way. (I used to _hate_ this behavior, and now I can't live without it.) Now, after hitting CTRL-c in the middle of typing a command (to just erase the whole thing), I find the behavior has changed, so that when I hit up it just takes me to the previous line.
> >
> > Anyone have any idea what's going on? It's not a big deal, but it seems to be a strange bug, and annoys me sometimes.
>
> Normally, this kind of problem is *very* connected to the OS, and terminal emulator, that you are using. The problems you mention deal with "curses/ncurses" library behavior and TERMCAP/TERMINFO databases; and to some extent, with interrupt handling. To some extent, the problems arise from "confused state" in the emulator, which can arise either from a mismatch between kernel and emulator state, or from bugs in either the emulator or terminal description. Sometimes, changing the value of the TERM environment variable can ease the problems (but that takes a lot experimentation and patience).
[snip]
> Yes, I should have mentioned, of course, that this is on Ubuntu 11.10, 64 bit. I'm using gnome-terminal, and TERM is set to xterm. I didn't think of reset before --- next time something weird happens I'll type '!reset' into Sage, if that is what you mean, and see if that restores things. I can't seem to replicate the behavior right now, though; it really happens only occasionally.
That's not what I meant. The 'reset' I referred to is an operation that should be provided by 'xterm'; I've forgotten what series of keys and mouse thingies one has to do to invoke the correct menu, but one of xterm's menus should give you a choice to "reset" the emulator.
HTH
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income
--------
Experience is what you get
when you don't get what you want.
--------