alejinjer / ush

Implementation of basic command-line interpreter (based on zsh and bash), using the C programming language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

USH

Content

Description

Implementation of basic command-line interpreter (based on zsh and bash), using the C programming language.

How to use

Compilation:

make
./ush

Reinstalliation:

make reinstall
./ush

Uninstalliation:

make uninstall

Implemented functionality

A set of builtins without any flags

  • export;
  • unset;
  • local;
  • exit;
  • bye;
  • history;
  • return;
  • true;
  • false;
  • jobs;
  • fg without any arguments and with %n, %str, %+, %-, n, str, +, - arguments.

A set of builtins with flags

  • env with next flags:

    • -i;
    • -P;
    • -u.
  • cd with next flags:

    • -s;
    • -P;
    • -.
  • pwd with next flags:

    • -L;
    • -P.
  • which with next flags:

    • -a;
    • -s.
  • echo with next flags:

    • -n;
    • -e;
    • -E.

Signals managing

  • CTRL+D;
  • CTRL+C;
  • CTRL+Z.

Characters escaping

Next characters can be escaped to be used literally: space, ', ", $, (, ), \, `, {, }.

Tilde expansions

Tilde expansions ~ with the followinf tilde-prefixes:

  • ~;
  • ~/dir_name;
  • username/dir_name;
  • ~+/dir_name;
  • ~-/dir_name.

Parameter expansions

  • only basic form - ${parameter}.

Command substitutions of next forms

  • `command`
  • $(command)

Nested command substitutions also supported.

Additional functionality

  • support of pipes |;
  • support of logical operators && and ||;
  • job control system (only for foregraund jobs and processes);
  • command history using Arrow keys;
  • command editing, cursor motion using Arrow keys;
  • prompt customization using ALT+1 combination;
  • the ; command line separator;
  • errors management;
  • user rnvironment management.

Developers

License

Collision is an open-sourced software licensed under the MIT license.

About

Implementation of basic command-line interpreter (based on zsh and bash), using the C programming language.

License:MIT License


Languages

Language:C 92.2%Language:Makefile 7.8%