Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Command Prompt: SUSE Linux, how to recall last typed thing like DOS

Options
  • 09-12-2004 6:39pm
    #1
    Registered Users Posts: 463 ✭✭


    Hey,
    Having to use linux at the moment with ProLog.. Just wondering, how you recall what you last typed when using the command prompt.

    In DOS you press the up or down key, in Linux ^[[A appears when I press the up key & ^[[B appears with the down key.

    thanks..


Comments

  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    More approporiate forum.

    Using up and down has always worked fine for me, but then I use Fedora Core 2 primarily. What version of Prolog are you using? Is it running from a system terminal or does it open its own?


  • Registered Users Posts: 463 ✭✭Emerson


    I'm using SUSE Linux.. why'd the Windows forum be more appropriate?

    The version is SICStus 3.10.0 (x86-linux-glibc2.2) running under KDE 3.2.1.. The "Konsole" is what I opened it with, under System > Terminal >


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Heh, damn, meant to point you to the *nix forum :p


  • Registered Users Posts: 488 ✭✭lad12


    Hey,
    Having to use linux at the moment with ProLog.. Just wondering, how you recall what you last typed when using the command prompt.

    In DOS you press the up or down key, in Linux ^[[A appears when I press the up key & ^[[B appears with the down key.

    thanks..

    LaZy.


  • Registered Users Posts: 463 ✭✭Emerson


    :rolleyes: I dispute that


  • Advertisement
  • Registered Users Posts: 488 ✭✭lad12


    In the wrong forum aswell tut tut.. :cool:


  • Registered Users Posts: 1,865 ✭✭✭Syth


    I think the problem is he programme you're using. Pretty much all the shells will support the up/down thing you mentioned. Am I correct in deducing that you want to be able to press up and down while in your prolog programme and for it to have a history? Some programmes can't do this. If you are using the same programme on windows as you are on linux and up/down works on windows then i'm not really sure what's going on. But it's most likely cause the programme isn't doing it.


  • Closed Accounts Posts: 82 ✭✭cyberbob


    Syth wrote:
    I think the problem is he programme you're using.

    yeah konsole is a pain.
    you should be able to configure it to accept up/down keys .
    if that fails use run xterm at the prompt instead of konsole.

    if all else fails , learn to use the ! operator


  • Registered Users Posts: 6,508 ✭✭✭daymobrew


    I don't know anything about prolog.
    If you are using prolog to be a 'normal' shell (like sh/ksh/csh) I recommend using 'bash'.
    Actually, sh is a symlink to bash on SuSE 9.0 (and Red Hat and presumably Fedora).
    Up/Down arrows recall previous commands. Ctrl-A to go to the start of the recalled command, Ctrl-E to go to the end.


  • Registered Users Posts: 1,865 ✭✭✭Syth


    Konsole can do up/down keys.

    What's this ! you speak of?


  • Advertisement
  • Registered Users Posts: 2,077 ✭✭✭parasite


    you can use `!!` to run the last command, or you can do `!xxx`, where xxx is the number of the command in the history, i'm sure you can do other stuff with it too, hmmm


  • Closed Accounts Posts: 82 ✭✭cyberbob


    parasite wrote:
    i'm sure you can do other stuff with it too, hmmm
    !a
    run the last command which began with an a.
    !b
    run the last command which began with a b ,

    etc

    !!a , the 2nd last command which began with an a
    etc

    konsole sux , its only perk is tabs


Advertisement