Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7867143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:37:50+00:00 2026-06-03T00:37:50+00:00

Good day, I am writing a simple CLI (command-line interface) application that provides a

  • 0

Good day,

I am writing a simple CLI (command-line interface) application that provides a simple prompt that can accept strings from the user, validates them, and performs certain actions based on input. Fairly straightforward.

I am looking for a platform independent, NON-GPL/LGPL means (or, at least something that works for POSIX compliant OS’s, like Linux, BSD, etc), so I can use the up/down arrows keys to scroll back and forth throughout the history of previously typed commands in my CLI application, and have them appear in the input line.

The goal is to effectively mimic the history feature found in BASH and most other shells. I would like to just use the up/down keys and have them detected. I’m assuming I would need to use interrupts or some specialized library for this; I would really like to just do this with standard ANSI C though, and must avoid any third party libraries entirely.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T00:37:52+00:00Added an answer on June 3, 2026 at 12:37 am

    If you insist on doing it yourself, then there’s not much we can say other than “do it yourself;” it’s not horribly complex but it’s not a morning’s work, either.

    You should very seriously consider using GNU readline, which is what everybody else (including bash) uses. It does all this and more and does it well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good Day, Assume that I am writing a Python-like range in C++. It provides
Good Day, I am writing an application where I'm downloading a file that is
Good day coders and codereses, I am writing a piece of code that goes
Good day! I'm writing a little tool that builds a GUI for my data-aware
Good day! I've found this solution here: VS2010 Web Publish command line version of
Good day, I am writing an iOS app that needs to authenticate with Twitter.
Good day, We just converted our web application .NET 1.1 to .NET 2.0. We
Good day. I know that in order to save object state in Java I
Good day, i will try to explain my problem as best as i can.
I'm writing a game that should run on several platforms. I need a good

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.