about summary refs log tree commit diff
path: root/src/nix/repl.cc
AgeCommit message (Collapse)AuthorFilesLines
2019-02-05 Revert "Restore parent mount namespace before executing a child process"Eelco Dolstra1-2/+0
This reverts commit a0ef21262f4d5652bfb65cfacaec01d89c475a93. This doesn't work in 'nix run' and nix-shell because setns() fails in multithreaded programs, and Boehm GC mark threads are uncancellable. Fixes #2646.
2018-12-25 remove some dead code in nix/repl.ccDmitry Kalinkin1-18/+1
Fixes a static analyzer warning: Expression 'isDrv' is always false. Fixes: 3beb6f6e7 ('Show derivations more concisely')
2018-12-12 nix repl: don't create result symlinksDaiderd Jordan1-1/+1
2018-11-20 repl: give user the choice between libeditline and libreadlineKai Harries1-0/+9
The goal is to support libeditline AND libreadline and let the user decide at compile time which one to use. Add a compile time option to use libreadline instead of libeditline. If compiled against libreadline completion functionality is lost because of a incompatibility between libeditlines and libreadlines completion function. Completion with libreadline is possible and can be added later. To use libreadline instead of libeditline the environment variables 'EDITLINE_LIBS' and 'EDITLINE_CFLAGS' have to been set during the ./configure step. Example: EDITLINE_LIBS="/usr/lib/x86_64-linux-gnu/libhistory.so /usr/lib/x86_64-linux-gnu/libreadline.so" EDITLINE_CFLAGS="-DREADLINE" The reason for this change is that for example on Debian already three different editline libraries exist but none of those is compatible the flavor used by nix. My hope is that with this change it would be easier to port nix to systems that have already libreadline available.
2018-11-20 repl: Remove code that was commented outKai Harries1-2/+0
2018-11-13 Merge branch 'feature/editline-pr' of https://github.com/dtzWill/nixEelco Dolstra1-31/+76
2018-11-13 Restore parent mount namespace before executing a child processEelco Dolstra1-0/+2
This ensures that they can't write to /nix/store. Fixes #2535.
2018-10-29 repl: complete if all matches share prefixWill Dietz1-0/+18
2018-10-29 editline: wipWill Dietz1-31/+58
2018-09-10 auto args on replDing Xiang Fei1-2/+3
2018-08-07 repl: don't add trailing spaces to history linesIvan Kozik1-1/+6
2018-06-23 repl: use `nix build` for building instead of `nix-store -r`Will Dietz1-1/+1
progress bar!
2018-06-12 Move EvalState from the stack to the heapEelco Dolstra1-2/+2
EvalState contains a few counters (e.g. nrValues) that increase quickly enough that they end up being interpreted as pointers by the garbage collector. Moving it to the heap makes them invisible to the garbage collector. This reduces the max RSS doing 100 evaluations of nixos.tests.firefox.x86_64-linux.drvPath from 455 MiB to 292 MiB. Note: ideally, allocations would be much further up in the 64-bit address space to reduce the odds of an integer being misinterpreted as a pointer. Maybe we can use some linker magic to move the .bss segment to a higher address.
2018-04-16 nix repl: Fix multiline SIGINT handling.Félix Baylac-Jacqué1-0/+1
Fixes #2076
2018-04-11 Fix #2057Eelco Dolstra1-0/+1
2017-12-26 nix repl: use linenoiseKeyType to differentiate ^C and ^DWill Dietz1-1/+10
Fixes #1757.
2017-11-27 no "linenoiseFree" in linenoise-ngWill Dietz1-1/+1
2017-10-24 nix: Respect -I, --arg, --argstrEelco Dolstra1-7/+6
Also, random cleanup to argument handling.
2017-08-09 nix repl: Support printing floating-point numbersEelco Dolstra1-0/+4
2017-07-30 Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim1-2/+2
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
2017-07-20 nix-shell: Use bashInteractive from <nixpkgs>Eelco Dolstra1-3/+3
This adds about 0.1s to nix-shell runtime in the case where bashInteractive already exists. See discussion at https://github.com/NixOS/nixpkgs/issues/27493.
2017-05-10 Replace readline by linenoiseEelco Dolstra1-105/+62
Using linenoise avoids a license compatibility issue (#1356), is a lot smaller and doesn't pull in ncurses.
2017-04-28 Check for libreadlineEelco Dolstra1-0/+4
2017-04-25 nix repl: Fix Ctrl-CEelco Dolstra1-0/+10
2017-04-25 Minor cleanupEelco Dolstra1-10/+7
2017-04-25 "using namespace std" considered harmfulEelco Dolstra1-6/+5
2017-04-25 nix repl: Use $XDG_DATA_HOME for the readline historyEelco Dolstra1-3/+4
2017-04-25 Make "nix repl" buildEelco Dolstra1-32/+34
2017-04-25 Cleanup in preparation of merging nix-repl repo into nix repoEelco Dolstra1-0/+719