Skip to content

Lightweight shell for embedded projects to interact with common clients : telnet/minicom/hyperterminal

Notifications You must be signed in to change notification settings

olegyurchenko/c_shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 

Repository files navigation

c_shell - Lightweight shell for embedded projects

Somehow I needed to embed a nice wrapper in a hardware project for administrative purposes like setting date, setting up network, etc.

Main library modules -

  • c_tty.c - Character User Interface. Provides command line editing, saving command history, etc.

  • c_sh.c - shell, provides command inlining and execution of primitive shell-like scripts.

c_tty - Character User Interface

c_tty supports basic line editing, understanding the keys:

  • backspace to delete characters,
  • Del to delete characters,
  • left and right arrow to move the insertion point,
  • Ctrl-C to ditch the entire line,
  • Up and Down arrow for select line from history buffer.
  • Tab to tab Completion

c_sh - shell for embedding your commands

  • Built-in commands: "exit", "quit", "break", "continue", "if", "then", "fi", "else", "elif", "true", "false", "while", "until", "for", "do", "done", "echo", "test", "[", "[[", "set", "read", "tee", "seq"

  • FIFO channel support: cmd1 | cmd2 | cmd3 (with user defined external handler)

  • Redirect STDIN/STDOUT/STDERR support: cmd1 > file 2> file, cmd1 2>file >&2 cmd < file (with user defined external handler)

  • Variable substitutions: $var ${var}

  • Command substitutions: $(cmd) `cmd`

About

Lightweight shell for embedded projects to interact with common clients : telnet/minicom/hyperterminal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages