summaryrefslogtreecommitdiffstats
path: root/nix-script
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-05-29 22:26:27 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-09-14 17:39:09 +0200
commit4fa7e95e7f56f0c27b944e8f3b649b98dfaf87eb (patch)
treee9b96f944e29cbba30fc0d68f07bb1cef8ae8eee /nix-script
parenta29bcf131cf172d9d52f1e54b2de3c43fb6af587 (diff)
Add: nix-script repl
This is a combination of 23 commits: * Add first draft for nix-shell repl * Remove functions which are in nix-utils.sh * Minify if-then-exit * Remove sudo run... why do I actually have this? * Include helpers * Add help text * Remove old arguments in parsing code * Dont print on stderr, do debugging output here * Remove explain checker, use dbg() as output function * Fix checker * Use bash to print * Use "exit" or "quit" to exit nix-repl * Remove doubled caller code * Move: script_for() function to helpers * Remove old variables * Fix bash call * move all_commands() function to nix-utils.sh * Formatted and extended all_commands() function * Lists executables only. * Shorten error message * Add helper to check whether a string contains a string * Add possibility to execute simple bash commands in repl * The more debug output, the better * More things, we should really squash this stuff
Diffstat (limited to 'nix-script')
-rwxr-xr-xnix-script16
1 files changed, 0 insertions, 16 deletions
diff --git a/nix-script b/nix-script
index 3860f20..5bdfe15 100755
--- a/nix-script
+++ b/nix-script
@@ -25,15 +25,6 @@ VERBOSE=0
source $(dirname ${BASH_SOURCE[0]})/nix-utils.sh
-#
-# Get the name of the script file for the command passed as argument
-#
-# Does not check whether the file exists.
-#
-script_for() {
- echo "$(dirname ${BASH_SOURCE[0]})/nix-script-${1}.sh"
-}
-
SHIFT_ARGS=0
#
@@ -56,13 +47,6 @@ shift_n() {
}
#
-# List all available commands
-#
-all_commands() {
- find $(dirname ${BASH_SOURCE[0]}) -type f -name "nix-script-*.sh"
-}
-
-#
# Parse the arguments for this script
#
for cmd