Thread: Ncurses or not?

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    40

    Ncurses or not?

    Like I wrote in an earlier post I am writing a shell, and now I've gotten as far as having a shell that works fairly well, but I want to add some functionality, but I'm not sure how.

    What I want to do is change it so that you can scroll between use commands as in most shells and tab-completion as in e.g. bash. But I'm not sure how to get the input character directly without the user pressing enter.

    I've found that this can be done using ncurses, but I think I would have to make major changes in the shell for this, so I was wondering if this can be done some other way or if ncurses is the only way?

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    69
    To create my shell I used, the termcap library. Its standart for all terminals, and not to hard to work with.

    http://www.gnu.org/software/termutil...o/termcap.html

  4. #4
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    readline library

  5. #5
    Registered User
    Join Date
    Apr 2008
    Posts
    40
    Thank you guys. I'm sorry about the FAQ, I looked there but I didn't find the entry vart is referring to.

    I think I'll go with the termcap library then, if other shells use it. Thanks for the tip.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 03-26-2009, 02:47 PM
  2. ncurses and fork
    By MK27 in forum Linux Programming
    Replies: 2
    Last Post: 10-05-2008, 08:55 PM
  3. Why I only get 8 colors out of ncurses?
    By Nazgulled in forum C Programming
    Replies: 3
    Last Post: 05-08-2007, 06:06 PM
  4. Ncurses and Standard Functions
    By gsoft in forum C Programming
    Replies: 2
    Last Post: 02-07-2005, 08:18 PM
  5. using the mouse with ncurses
    By dsharp in forum Linux Programming
    Replies: 2
    Last Post: 12-24-2003, 05:35 PM