Coder Social home page Coder Social logo

Comments (2)

fluffy-kaiju avatar fluffy-kaiju commented on August 21, 2024

Wip fix

The fix

Expected behavior fix:

(o_O)> 1|2|3|4|%
1.|.2.|.3.|.4.|.%...............................................
[0]: 1
[2]: |
[4]: 2
[6]: |
[8]: 3
[10]: |
[12]: 4
[14]: |
[16]: %

(o_O)>

Todo fix

That case:

(o_O)> 1>>|<<2
1.>>|<<.2.......................................................
[0]: 1
[2]: >>|<<
[8]: 2

Expected:

(o_O)> 1>>|<<2
redir: [1]: [>>|<<2]
1.>>.|.<<.2.......................................................
[0]: 1
[2]: >>
[4]: |
[5]: <<
[8]: 2

Note

Interesting case :

bash-3.2$ echo test>|cat>123
bash-3.2$ ls
123     cat
bash-3.2$ cat 123
test
bash-3.2$ cat ./cat 
bash-3.2$ 

from minishell.

fluffy-kaiju avatar fluffy-kaiju commented on August 21, 2024

To fix

New behaviour

1|.2|.3|.4|.%...................................................


[
    content_len: 1,
    {
        type: 1,
        arg: [
            [0]: "1|",
            [1]: "2|",
            [2]: "3|",
            [3]: "4|",
            [4]: "%",
        ]
]

Expected

1|.2|.3|.4|.%...................................................


[
    content_len: 1,
    {
        type: 1,
        arg: [
            [0]: "1",
        ]
    {
        type: 2,
        arg: [
            [4]: "|",
        ]
    {
        type: 1,
        arg: [
            [1]: "2",
        ]
    {
        type: 2,
        arg: [
            [4]: "|",
        ]
    {
        type: 1,
        arg: [
            [2]: "3",
        ]
    {
        type: 2,
        arg: [
            [4]: "|",
        ]
    {
        type: 1,
        arg: [
            [3]: "4",
        ]
    {
        type: 2,
        arg: [
            [4]: "|",
        ]
    {
        type: 1,
        arg: [
            [4]: "%",
        ]
]

from minishell.

Related Issues (19)

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.