seirl / 42sh

42sh is a shell which tries (hard) to be a clone of bash --posix.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

42sh {#mainpage}
====

@verbatim
   _____________________                              _____________________
   `-._                 \           |\__/|           /                 _.-'
       \                 \          |    |          /                 /
        \                 `-_______/      \_______-'                 /
         |                   _  _ ____      _                       |
         |                 | || ||___ \ ___| |__                    |
         |                 | || |_ __) / __| '_ \                   |
         /                 |__   _/ __/\__ \ | | |                  \
        /                     |_||_____|___/_| |_|                   \
       /______________                                  ______________\
                      `----._        HS24        _.----'
                             `--.            .--'
                                 `-.      .-'
                                    \    /
                                     \  /
                                      \/
@endverbatim

42sh
====

42sh is a shell which tries (hard) to be a clone of bash --posix.

Install
=======
The build system used by this project is CMake. A makefile wrap the procedure
to launch the build.

    $ make

If all went well, a binary named '42sh' should be in the root directory of
the project. You can also install the program with:

    $ make install

Documentation
=============
    User
    ----
        A manpage is available at ./doc/42sh.man.
            $ man ./doc/42sh.man
        Or just the following command if you installed it
            $ man 42sh

    Developer
    ---------
        The developer documentation can be generated with doxygen:
            $ make doc
            $ firefox doc/html/index.html

Test suite
==========
We develop a test suite with the python programming language. To make sure
everything work on your system, please use:
    $ make fastcheck
Or
    $ make check
To check for memory leaks
Or
    $ make coverage
To see the code covered by the tests (requires lcov)

Features
========
We implemented some extra features, here is a (possibly non-exhaustive) list:

Readline
--------
    - Alt-a and Alt-b (move by word)
    - History management
    - Alt-. basic behaviour (insert the last word of the last command)
    - Alt-q (pause the current command to write a new one)
    - Alt-h (run "man" on the first word of the current command)
    - Alt-e (run "$EDITOR" on the current command)
    - Ctrl-w (delete a word)
    - Ctrl-u (delete from beginning to cursor)
    - HOME and END keys
    - DEL key
    - Konami code
    - Programs autocompletion with correction
    - Path completion

Lexer/Parser
------------
    - Display locations on parse error
    - Communicate with readline about incomplet input

Builtins
--------
    - alias
    - break
    - cd
    - continue
    - echo
    - exec
    - exit
    - history
    - rehash
    - set
    - shopt
    - source
    - unalias
    - unset

Env
---
    - read-only variables

Expansion
---------
    - ${var:+word} (alternative expansion)
    - ${var:-word} (fallback expansion)
    - ${var:?word} (error expansion)
    - ${var:=word} (assignment expansion)
    - ${var%word} (shortest suffix removal)
    - ${var%%word} (largest suffix removal)
    - ${var#word} (shortest prefix removal)
    - ${var##word} (largest prefix removal)
    - Bracket expansion : echo foo{bar,beer}
    - dotglob, nullglob and caseglob

Arithmetic
----------
    - Unary operators +, -, ~, !
    - Binary operators **, /, %, *, +, -, <<, >>, &, ^, &, |, &&, ||
    - Right/left-associative operators (all unaries and **)
    - Parenthesis
    - Expansion of vars without a dollar sign : $(( a + 2 ))

Ast-printer
-----------
    - Colors !

AUTHORS
=======
    - Rémi « halfr » Audebert
    - Nassim « nass » Eddequiouaq
    - Paul « Dettorer » Hervot
    - Antoine « seirl » Pietri
    - Adrien « schischi » Schildknecht

About

42sh is a shell which tries (hard) to be a clone of bash --posix.

License:Other


Languages

Language:C 84.6%Language:Python 9.9%Language:CMake 3.9%Language:Shell 1.2%Language:Makefile 0.2%Language:Vim Script 0.2%