Code Monkey home page Code Monkey logo

42sh's Introduction

42sh

Posix shell implementation with limited libraries for the 42network cursus.

Features

  • Ability to customize the prompt.
  • Complete prompt with edition and multiple line support.
  • Redirection and aggregation operators.
  • Pipes and separators.
  • && and || logical operators.
  • Monitoring of intern shell variables.
  • Job control monitoring, with buitl-ins jobs, fg, bg and the & operator
  • A correct monitoring of all signals
  • Inhibitors ” (double quote), ’ (simple quote) and \
  • Control substitution: $()
  • ZSH-like command completion with scrolling.
  • Contextual dynamic completion of commands, built-ins, files, internal and environment variables. What is meant by contextual? re-we use the “ls /” command and your cursor is on the /, then a contextual completion will only propose the content of the root folder and not the commands or built-ins. Same for this case: “echo ${S”, the completion should only propose variable names that start with S, whether internal or environmental.
  • Alias management via built-ins alias and unalias.
  • A hash table and built-in hash to interact with it.
  • The built-in test with the following operators: texttt-b, -c, -d, -e, -f, -g, -L, -p, -r, -S, -s, -u, -w, -x, -z, =, !=, -eq, -ne, -ge, -lt, -le, !. As well as the possibility of a simple operand, without operator.
  • Complete management of the history:
    • Expansions:
    • !!
    • !word
    • !number
    • !-number
    • Saving to a file so that it can be used over several sessions
    • Built-in fc (all POSIX options)
    • Incremental search in the history with CTRL-R
  • Tilde expansion and additional parameter formats:
    • ~
    • ${parameter:-word}
    • ${parameter:=word}
    • ${parameter:?word}
    • ${parameter:+word}
    • ${#parameter}
    • ${parameter%}
    • ${parameter%%}
    • ${parameter#}
    • ${parameter##}
  • The following builtins:
    • cd
    • fc
    • jobs
    • fg
    • bg
    • test
    • alias
    • unalias
    • echo
    • exit
    • export
    • false
    • true
    • hash
    • history
    • pwd
    • rehash
    • set
    • type
    • unset
    • unsetenv

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.