Git Product home page Git Product logo

minishell's People

Contributors

abeaugustijn avatar victortennekes avatar

Watchers

James Cloos avatar  avatar

Forkers

victortennekes

minishell's Issues

exit status

ctrl-c, ctrl-d, ctrl-\ and a bunch of other exit status stuff isn't working properly.

Running `;`

Running with just ; results in a segmentation fault.

Leaks

every command execution a ROOT LEAK occurs.

Fix the parser so it takes care of relationships

The parser should define the relationships between commands. So a command with a trailing | character should have the relationship-value of PIPE.
This information can then later be used to handle all redirections and such.

GNL exit

When giving input like test and then pressing ctrl + D twice would result in exit when it shouldn't.

possible waitpid issue

run base64 < /dev/urandom | head -c 100 once ready, could result in issue with waitpid.

segfault long command

Echo ; echo \n ' \n this is the; "first line"' ; echo "and right here;;; 'We have the second'" ; echo and" a fe"'w 'here'; with some slash and quotes .' '\' ; echo '\\' ; echo "\\" ; echo "\"" ; echo \\ ; echo \' ; echo \" "\\" "\"" \\ \' \" results in a segfault.

Closing semicolon

Semicolon doesn't work as expected.

echo "test1"; echo "test2"
results in:

test1 echo test2

echo test1; echo test2
results in:

test1
test2

Pipes

Pipes don't work yet

Trailing semicolon

When a trailing semicolon is left in a command, the shell interprets it as an empty command, so it exits.

e.g. echo test;

Implement a way of defning relationships between commands

An example of this could be the following.

find / -name "*.c" | grep "test" > all_test_files.txt

The relationships should describe where the output of every command should go.
In this example, the output of the first command should be piped to the second one, which output will be written to the given file.

An idea for a solution could be to add a field to the cmd struct which defines the relationship to the next command in the list. This relationship could have the value of NONE, PIPE, REDIRECT, APPEND (or something in that neighborhood.

Exit on enter

When no command is entered, and return is pressed, the shell exists.
This can be solved by looking at the get_next_line output.

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.