Commit graph

80 commits

Author SHA1 Message Date
Eelco Dolstra 0e49f94120 Merge pull request #35 from orbekk/master
Update <nixpkgs/nixos> path in documentation.
2017-01-02 11:51:21 +01:00
Kjetil Orbekk 5476e987d5 Update <nixpkgs/nixos> path in documentation. 2017-01-01 16:13:11 -05:00
Eelco Dolstra 8b60529231 Strip ANSI escapes from file names
Also, use bright blue for lambdas, otherwise my eyes hurt.
2016-07-21 11:21:59 +02:00
Eelco Dolstra af5ff6c918 Merge branch 'lambda-position' of https://github.com/fkz/nix-repl 2016-07-21 11:16:22 +02:00
Eelco Dolstra df32610dfa Merge branch 'show-trace' of https://github.com/fkz/nix-repl 2016-07-21 11:14:37 +02:00
Eelco Dolstra 00ee039c27 Merge branch 'colorize' of https://github.com/ehmry/nix-repl 2016-07-21 11:12:45 +02:00
Emery Hemingway 34ec98176e fixup "Colorize"
Do not quote escape sequence macro
2016-06-25 13:40:50 +02:00
Emery Hemingway eaabcba1c3 Colorize
Berlin NixOS meetup
2016-06-25 13:28:27 +02:00
Fabian Schmitthenner 828cf7b058 show trace of errors when using --show-trace 2016-03-19 13:55:10 +00:00
Eelco Dolstra e37bca136e Merge pull request #19 from tsion/x-command
Add :u command which works like `nix-shell -p`.
2016-03-07 15:52:02 +01:00
Fabian Schmitthenner 8bec2c07a1 When showing a lambda, also show the position of the definition 2016-03-05 16:48:04 +00:00
Scott Olson e2ff27da07 Rename :x to :u, for 'use'. 2016-03-01 04:03:18 -06:00
Scott Olson 86e93b9f61 Add :x command which works like nix-shell -p. 2016-03-01 04:03:18 -06:00
Eelco Dolstra 79b02dffcb Merge pull request #20 from tsion/more-help
Expand the help message printed from --help.
2016-02-29 12:48:04 +01:00
Eelco Dolstra 2bfb00c66e Merge pull request #17 from tsion/install-cmd
Add :i command to install a derivation to the current profile.
2016-02-29 12:47:00 +01:00
Eelco Dolstra b1cc845413 Merge pull request #25 from fkz/fix-store
fix nix-repl compilation after we don't have a global store variable anymore
2016-02-29 12:46:15 +01:00
Fabian Schmitthenner ff8d0698c7 fix nix-repl after we don't have a global store variable anymore (cf nix@c10c61449f954702ae6d8092120321744acd82ff) 2016-02-28 22:44:08 +00:00
Eelco Dolstra a1ea85e92b Merge pull request #24 from tsion/whitespace
Fix handling of whitespace and ignore blank inputs.
2016-02-24 12:02:06 +01:00
Scott Olson 38816759fc Ignore blank inputs.
Previously, nix-repl would consider this an incomplete parse and wait for the
next line as if it was a multiline input.

Blank lines in the middle of a multiline input will continue to work.
2016-02-23 18:30:21 -06:00
Scott Olson 87e6649fc3 Fix handling of whitespace.
Whitespace will no longer be removed from input lines, which fixes pasting
multiline strings containing end-of-line or beginning-of-line whitespace.
2016-02-23 18:29:56 -06:00
Eelco Dolstra 5599665a27 Merge pull request #22 from tsion/quote-invalid-vars
Print syntactially invalid attribute names as strings.
2016-02-23 11:07:55 +01:00
Scott Olson 97da6d62f2 Print syntactially invalid attribute names as strings. 2016-02-20 01:14:22 -06:00
Eelco Dolstra a52fd0dbd0 Merge branch 'issue-13' of https://github.com/tsion/nix-repl 2016-02-18 19:40:27 +01:00
Eelco Dolstra 02daf2ec0b Merge branch 'multiline' of https://github.com/tsion/nix-repl 2016-02-18 19:33:46 +01:00
Scott Olson 56c7f0e8c5 Fix typo in comment. 2016-02-18 07:04:55 -06:00
Scott Olson 60ba98242f Fix recognition of REPL commands. 2016-02-18 06:59:51 -06:00
Scott Olson 64080d26fe Cancel multiline input on Ctrl-C. 2016-02-18 06:50:52 -06:00
Scott Olson 2d729e4f6f Support multiline input by detecting "unfinished" parse errors.
Fixes #4,
2016-02-18 06:27:39 -06:00
Scott Olson 287dfee35e Expand the help message printed from --help.
Fixes #10. I consider this a temporary measure, however, until nix-repl has a
manpage (see #14). Then it can just open its manpage on --help like the other
nix tools do.

Much of the text in this commit was copied from nix-build's manpage.
2016-02-18 04:05:11 -06:00
Scott Olson cfc874ee52 Open the store before constructing EvalState.
EvalState requires the `store` global to be initialized before it is constructed
in some cases, e.g. when it needs to download a tarball for something in
NIX_PATH. Hence, this fixes #13.
2016-02-16 18:40:47 -06:00
Scott Olson 82aca33899 Add :i command to install a package to the current profile.
It works by running `nix-env -i <derivation path>`.

Fixes #15.
2016-02-16 00:36:50 -06:00
Scott Olson 30a7bfbebe Fix grammar. 2016-02-15 23:11:26 -06:00
Scott Olson 3cfb8d1584 Remove unused global variable. 2016-02-15 19:16:24 -06:00
Eelco Dolstra dc8b51754b Merge pull request #16 from tsion/dashed-assign
Improve variable name parsing for assignments.
2016-02-15 10:25:45 +01:00
Scott Olson f30fd9c47b Don't consider empty strings or strings beginning with numbers as variable names. 2016-02-14 01:50:47 -06:00
Scott Olson 2111098a3a Don't consider strings starting with - or ' as variable names. 2016-02-14 01:29:48 -06:00
Scott Olson f7980b4712 Parse foo-bar = expr as an assignment. 2016-02-14 01:16:30 -06:00
Eelco Dolstra 8a2f5f0607 Fix building against Nix 1.10
Fixes #12.
2015-09-07 13:05:58 +02:00
Susan Potter 57aeef0b6a Fix nix-repl does not support '--help'
According to popular practice and convention `nix-repl` now supports `--help`
like a good POSIX citizen[1].

[1] https://www.gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html
2015-07-06 15:53:47 +02:00
Eelco Dolstra 45c6405a30 Fix building against latest Nix
Fixes #8.
Fixes #9.
2015-06-02 13:24:24 +02:00
Eelco Dolstra f92408136e Fix building against current Nix master 2014-12-01 10:07:10 +01:00
Eelco Dolstra 71d61508f2 Support -I flag 2014-08-26 20:05:08 +02:00
Eelco Dolstra 89f9c0d41b Fix building against current Nix master 2014-08-26 20:03:12 +02:00
Eelco Dolstra 02b66e97ba Fix building against current Nix master 2014-07-24 17:53:32 +02:00
Eelco Dolstra 2cf0e67761 Handle non-numeric version strings
Fixes #2.
2014-07-24 17:46:58 +02:00
Eelco Dolstra 66b2d18243 Don't parse 'var == expr' as an assignment 2014-06-16 10:05:09 -04:00
Eelco Dolstra 1734e8a149 Fix crash in tab completion
Fixes #1. Patch by Maxdamantus.
2014-04-11 12:51:15 +02:00
Eelco Dolstra 22a47ab03c Fix building against Nix 1.7 2014-04-11 12:50:46 +02:00
Eelco Dolstra 6a4a8208be Fix building against current Nix 2014-01-28 10:42:23 +01:00
Eelco Dolstra 3beb6f6e76 Show derivations more concisely 2014-01-28 10:42:23 +01:00