tdenniston / bish

Bish is a language that compiles to Bash. It's designed to give shell scripting a more comfortable and modern feel.
MIT License
1.48k stars 36 forks source link

What are the functions I want to see in the standard library #26

Closed egorsmkv closed 8 years ago

egorsmkv commented 9 years ago

Here I propose to speak about all the standard features that will be included in Bish. It is desirable to describe the functions that are used very often in scripting.

My suggestions: abort - display a message if something went wrong

# example
def abort(m) {
    println(m);
    @(exit 1);
}

Beauty can add the selected message in red.

chmod - establish certain rights to the file / folder read - receiving data from a user glob - retrieving files by mask

tdenniston commented 9 years ago

Abort is a good one. I still haven't decided if the standard library should contain bish wrappers around many bash commands. In other words, I'm not sure it makes sense to have a chmod bish function when the user can just execute @(chmod) directly.

egorsmkv commented 9 years ago

@tdenniston Need to make sure that they return an error if the operation is not possible. It is necessary to shift from implicit user scripting problems on the tongue.