Repository navigation
Add stdlib #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add stdlib #228
Changes from all commits
bb9aee4
bcc89e9
79ec23e
b210479
007a812
c227d1a
e9f30df
0cf470f
ea4d50d
7b9653e
2d9602a
d5851e2
227a4b8
b8c3653
679da5d
cdd33ff
e0c3a44
d3e418d
87ba285
d5097e1
a23eee5
6ca1cd2
63c664a
c34a15a
ed3ecbe
a676f0c
1863392
f24c71d
b283b64
025680b
7db531b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| <!-- mdtocstart --> | ||
|
|
||
| # Table of Contents | ||
|
|
||
| - [fmt](#fmt) | ||
| - [fmt_println](#fmtprintln) | ||
|
|
||
| <!-- mdtocend --> | ||
|
|
||
| # fmt | ||
|
|
||
| ## fmt_println | ||
|
|
||
| Same behavior as print but adds a newline on the end. | ||
|
|
||
| ```nash | ||
| import fmt | ||
|
|
||
| fmt_println("hi") | ||
| #Output:"hi\n" | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,10 @@ done | |
|
|
||
| $GO tool cover -func coverage.txt | ||
|
|
||
| echo "running stdlib tests" | ||
| export NASHPATH=`pwd` | ||
| ./cmd/nash/nash ./stdlib/fmt_test.sh | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
|
||
| # To submit the test coverage result to coveralls.io, | ||
| # use goveralls (https://github.com/mattn/goveralls) | ||
| # goveralls -coverprofile=profile.cov -service=travis-ci | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/bin/bash | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's the use case for this script?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Installing a nash release (instead of the master)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but someone will download the entire source code to just invoke a script that downloads the binary release? $ curl https://raw.githubusercontent.com/NeowayLabs/nash/master/hack/install/linux.sh | bash -If this is the case, then better to update the README explaining the right way of invoking this script. |
||
|
|
||
| set -o errexit | ||
| set -o nounset | ||
|
|
||
| VERSION="v0.5" | ||
| echo "installing nash: "$VERSION" at NASHPATH: "$NASHPATH | ||
|
|
||
| cd $NASHPATH | ||
| tarfile="nash-$VERSION-linux-amd64.tar.gz" | ||
| wget https://github.com/NeowayLabs/nash/releases/download/$VERSION/$tarfile | ||
| tar xvfz $tarfile | ||
| rm -f $tarfile | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where will the user set this environment variable? I think this is confusing because nash will init their environment from
$NASHPATH/init, but NASHPATH needs to be set in the first place... But how if nash is the login shell? You mean to place the NASHPATH env config inside /etc/profile ?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought more about this and I think is useful for this behaviour to work when someone wants to put their NASHPATH somewhere else other than the default path. But I think it should not be the default way of installing nash, because it requires another login shell or root access to /etc/profile.d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you wish to improve this docs it will be welcomed, I think you understand this better =)