about summary refs log tree commit diff
path: root/nix-repl.cc
AgeCommit message (Collapse)AuthorFilesLines
2016-02-28 fix nix-repl after we don't have a global store variable anymore (cf ↵Fabian Schmitthenner1-6/+5
nix@c10c61449f954702ae6d8092120321744acd82ff)
2016-02-23 Ignore blank inputs.Scott Olson1-1/+1
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 Fix handling of whitespace.Scott Olson1-5/+4
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-20 Print syntactially invalid attribute names as strings.Scott Olson1-9/+19
2016-02-18 Merge branch 'issue-13' of https://github.com/tsion/nix-replEelco Dolstra1-2/+1
2016-02-18 Fix typo in comment.Scott Olson1-1/+1
2016-02-18 Fix recognition of REPL commands.Scott Olson1-1/+1
2016-02-18 Cancel multiline input on Ctrl-C.Scott Olson1-11/+9
2016-02-18 Support multiline input by detecting "unfinished" parse errors.Scott Olson1-5/+23
Fixes #4,
2016-02-16 Open the store before constructing EvalState.Scott Olson1-2/+1
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-14 Don't consider empty strings or strings beginning with numbers as variable ↵Scott Olson1-2/+3
names.
2016-02-14 Don't consider strings starting with - or ' as variable names.Scott Olson1-1/+2
2016-02-14 Parse `foo-bar = expr` as an assignment.Scott Olson1-1/+1
2015-09-07 Fix building against Nix 1.10Eelco Dolstra1-32/+36
Fixes #12.
2015-07-06 Fix nix-repl does not support '--help'Susan Potter1-1/+7
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-06-02 Fix building against latest NixEelco Dolstra1-0/+1
Fixes #8. Fixes #9.
2014-12-01 Fix building against current Nix masterEelco Dolstra1-1/+1
2014-08-26 Support -I flagEelco Dolstra1-5/+7
2014-08-26 Fix building against current Nix masterEelco Dolstra1-7/+23
2014-07-24 Fix building against current Nix masterEelco Dolstra1-1/+2
2014-06-16 Don't parse 'var == expr' as an assignmentEelco Dolstra1-0/+2
2014-04-11 Fix crash in tab completionEelco Dolstra1-1/+3
Fixes #1. Patch by Maxdamantus.
2014-04-11 Fix building against Nix 1.7Eelco Dolstra1-2/+2
2014-01-28 Fix building against current NixEelco Dolstra1-2/+2
2014-01-28 Show derivations more conciselyEelco Dolstra1-6/+13
2013-09-09 Make tab-completion work on builtinsEelco Dolstra1-1/+4
2013-09-09 On reload, wipe the environmentEelco Dolstra1-8/+18
2013-09-09 Add :reload commandEelco Dolstra1-8/+33
2013-09-09 Add :quit commandEelco Dolstra1-19/+36
2013-09-09 Add sugar for defining a variableEelco Dolstra1-14/+41
‘x = <expr>’ is short for ‘:a { x = <expr>; }’. Note that the right-hand side refers to the original scope, so you get: nix-repl> x = 1 nix-repl> x = x + 1 nix-repl> x 2 rather than an infinite recursion.
2013-09-09 Add help (:?)Eelco Dolstra1-1/+13
2013-09-09 Support tab-completion on attribute setsEelco Dolstra1-5/+34
Example: $ nix-repl '<nixos>' > config.services.xserver.desktop<TAB> comletes to > config.services.xserver.desktopManager You also get suggestions if there are multiple matches: > config.services.xserver.desktopManager.kde4 config.services.xserver.desktopManager.kde4.enable config.services.xserver.desktopManager.kde4.phononBackends
2013-09-09 printValue: Show assertion errors inlineEelco Dolstra1-6/+18
2013-09-09 printValue: Don't show lists/attribute sets twiceEelco Dolstra1-6/+26
2013-09-07 Improved value displayEelco Dolstra1-2/+116
By default, we don't recurse into attribute sets or lists when printing a value. However, the new :p command does recurse.
2013-09-06 Restore affinityEelco Dolstra1-7/+26
2013-09-06 Add basic variable name completionEelco Dolstra1-42/+87
2013-09-06 Load files specified on the command lineEelco Dolstra1-12/+24
For example: $ nix-repl '<nixpkgs>' '<nixos>' Welcome to Nix version 1.6pre3215_2c1ecf8. Type :? for help. Loading ‘<nixpkgs>’... Added 3337 variables. Loading ‘<nixos>’... Added 7 variables. nix-repl>
2013-09-06 Add a command :s to start a nix-shell for a derivationEelco Dolstra1-13/+21
2013-09-06 Add a command :b to build a derivationEelco Dolstra1-5/+26
2013-09-06 Don't exit on SIGINT during evaluationEelco Dolstra1-0/+3
However, this may leave thunks in black-holed state, so it's not really safe.
2013-09-06 Use readline history fileEelco Dolstra1-1/+7
2013-09-06 Handle SIGINT to cancel the current lineEelco Dolstra1-5/+37
2013-09-02 Add a command :l for loading a file into scopeEelco Dolstra1-10/+33
Example: nix-repl> :l <nixpkgs> nix-repl> lib.range 0 10 [ 0 1 2 3 4 5 6 7 8 9 10 ] nix-repl> :l <nixos> nix-repl> config.boot.kernelModules [ "vboxdrv" "vboxnetadp" ... ]
2013-09-02 Add a command :t for showing the type of an expressionEelco Dolstra1-4/+17
2013-09-02 Support adding variables to the scopeEelco Dolstra1-9/+86
The command ":a <expr>" evaluates <expr> and adds the attributes in the resulting attribute set to the interpreter scope. For instance: nix-repl> :a import <nixpkgs> {} nix-repl> lib.range 0 10 [ 0 1 2 3 4 5 6 7 8 9 10 ]
2013-09-02 Initial version of nix-replEelco Dolstra1-0/+57
This program interactively reads a Nix expression from the user, evaluates it, and prints the result.