dundalek / closh Goto Github PK
View Code? Open in Web Editor NEWBash-like shell based on Clojure
License: Eclipse Public License 1.0
Bash-like shell based on Clojure
License: Eclipse Public License 1.0
I think it should work like fzf. See also the fish
key bindings: https://github.com/fisherman/fzf
The whole test suite takes minutes to run, which is too slow. The reason for this is that it spawns child process to evaluate each closh case.
Possible solutions:
Why Clojurescript and not JVM?
I installed Closh like this:
$ cd $HOME
$ npm install lumo-cljs closh
$ export "PATH=$HOME/node_modules/.bin:$PATH"
Afterwards, executing closh
drops me into a Lumo REPL instead of Closh:
$ closh
Lumo 1.0.0-alpha3
ClojureScript 1.9.293
Exit: Control+D or :cljs/quit or exit
cljs.user=>
The generated file $HOME/node_modules/.bin/closh
does not appear to be terribly wrong:
#!/usr/bin/env node
'use strict';
var spawn = require('child_process').spawn;
var path = require('path');
var os = require('os');
var fs = require('fs');
var isWindows = /^win/.test(process.platform);
var bin = isWindows ? 'lumo.cmd' : 'lumo';
var args = [
'--classpath', path.join(__dirname, '..', 'src'),
'--cache', path.join(os.homedir(), '.lumo_cache'),
'-m', 'closh.main',
];
// NODE_PATH seems to be missing when running as global binary
var paths = [
path.join(__dirname, '..', 'node_modules'),
path.join(__dirname, '..', '..')
];
if (process.env.NODE_PATH) {
paths.push(process.env.NODE_PATH);
}
process.env.NODE_PATH = paths.join(isWindows ? ';' : ':');
spawn(bin, args, { stdio: 'inherit' }).on('exit', process.exit);
Hi,
Simple example that does not work for me:
(for [i (range 100)]
(sh echo i))```
2 problems:
1. multi-line input does not seem to be supported, the loop works in using 1 line.
2. the value of i is not expanded. `(for [i (range 100)] i)` works as expected...
When running a long running process and resizing the terminal window, closh prompt gets print mixing with the process output. This is likely bug in the readline implementation. It should be solved with the new readline implementation.
A la fish
, where it’s very useful for, e.g., verifying that a pasted-in string does not need escaping. Feel free to close if it’s not in the pipeline.
For user defined helpers I am thinking of supporting following:
Aliases for defining / overriding functionality. When alias is used it does not get expanded and is saved into history as is.
Example:
(defalias ls "ls --color=auto")
Abbreviations are similar to aliases but expand to underlying definition. Therefore autocomplete can work seamlessly and also full command is saved to history. Inspired by abbr in fish. See also discussion.
(defabbrev ga "git add")
(defabbr gaa "git add --all")
Classic Clojure functions, already works.
(defn hello [name]
(str "Hello " name))
Run in command line like: (hello "World")
.
Similar to functions, but can be executed like commands without parens. Related to builtin commands. Defining similar to defn:
(defcmd hello [name]
(str "Hello " name))
Run in command line like: hello World
. There should probably also be a way to promote existing function to a command.
File redirection seems to be broken when using functional pipes, e.g.:
echo hello | (clojure.string/upper-case) > tmp.txt
It should be possible to make closh run via the clj
tool with cljs.main
and node as eval target.
Is there a way to get terminal colours ? Would that involve some sort of tty emulation ?
Should the lumo repo be imported as a subproject of closh?
If that seems like a good idea, should it be a submodule or subtree? I don't feel strongly either way. I guess I lean toward subtree.
I'm happy to send a PR
Seems it "closhed" in unahdled error on Windows 7. May be due to demokit dependency
C:\Users\4mithc\AppData\Roaming\npm-cache\_logs>closh events.js:163 throw er; // Unhandled 'error' event ^ Error: spawn lumo ENOENT at exports._errnoException (util.js:1050:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32) at onErrorNT (internal/child_process.js:367:16) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9) at Module.runMain (module.js:607:11) at run (bootstrap_node.js:427:7) at startup (bootstrap_node.js:151:9) at bootstrap_node.js:542:3
I think of demokit because it's install also ends with
`C:\Users\dfomin\AppData\Roaming\npm-cache_logs>npm install -g demokit
C:\Users\dfomin\AppData\Roaming\npm\demokit -> C:\Users\dfomin\AppData\Roaming\n
pm\node_modules\demokit\bin\demokit-cli.js
> [email protected] postinstall C:\Users\dfomin\AppData\Roaming\npm\node_modules\dem okit > node install.js events.js:163 throw er; // Unhandled 'error' event ^ Error: spawn npm ENOENT at exports._errnoException (util.js:1050:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32) at onErrorNT (internal/child_process.js:367:16) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9) at Module.runMain (module.js:607:11) at run (bootstrap_node.js:427:7) at startup (bootstrap_node.js:151:9) at bootstrap_node.js:542:3 npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "demokit" npm ERR! node v7.10.0 npm ERR! npm v4.2.0 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] postinstall: `node install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] postinstall script 'node install.js'.`
And seems demokit is not supporting Windows
This works fine
$ nano .closhrc
This does not
$ nano ~/.closhrc
⬆
WARNING: No such namespace: , could not locate .cljs, .cljc, or JavaScript source providing "" at line 1
⬆
WARNING: Use of undeclared Var / at line 1
Unexpected token .
createScript (vm.cljs:74:10)
Object.runInThisContext (vm.cljs:116:10)
(Object.lt)
(Object.lumo.repl.caching_node_eval)
(NO_SOURCE_FILE <embedded>:6020:273)
z (NO_SOURCE_FILE <embedded>:6021:263)
Object.cljs.js.eval_str_STAR_ (NO_SOURCE_FILE <embedded>:6022:328)
Function.cljs.js.eval_str.cljs$core$IFn$_invoke$arity$5 (NO_SOURCE_FILE <embedded>:6025:508)
lumo.repl.execute_text (NO_SOURCE_FILE <embedded>:6511:475)
closh$eval$execute_text (evalmachine.<anonymous>:7:24)
"$ "
Same goes for cd
$ cd ~
Unmatched delimiter ).
(new)
Function.cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:1928:72)
Function.cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2 (NO_SOURCE_FILE <embedded>:1927:449)
Function.cljs.tools.reader.impl.errors.throw_ex.cljs$core$IFn$_invoke$arity$variadic (evalmachine.<anonymous>:53:25)
Function.cljs.tools.reader.impl.errors.reader_error.cljs$core$IFn$_invoke$arity$variadic (evalmachine.<anonymous>:91:47)
(Object.cljs$tools$reader$impl$errors$throw_unmatch_delimiter)
cljs.tools.reader.read_unmatched_delimiter (NO_SOURCE_FILE <embedded>:2157:270)
Object.cljs.tools.reader.read_STAR__internal (NO_SOURCE_FILE <embedded>:2269:407)
Function.cljs.tools.reader.read_STAR_.cljs$core$IFn$_invoke$arity$6 (NO_SOURCE_FILE <embedded>:2272:111)
Function.cljs.tools.reader.read_STAR_.cljs$core$IFn$_invoke$arity$5 (NO_SOURCE_FILE <embedded>:2271:116)
"$ "
Hello,
While I'm not nearly as experienced as probably most of you all who look into Closh are, I thought it might be interesting if we could create sort of a in-browser Closh playground for people to check out easily. Obviously it'd be written in Clojure[Script] 😉, but I think it'd be a fun project.
Currently we test by either calling eval directly or spawning a special helper process.
It would be good to add tests that spawn the closh itself and send commands via stdin. This would also allow us to test UI interaction (e.g. history search).
There might be some trickiness to figure out to wait for the process to start and parsing out the prompt.
Just paste this snippet and you'll see:
(require-macros '[closh.core :refer [sh-str]])
(defn closh-prompt []
(sh-str fish -c fish_prompt))
When I make it into one-line commands, the error is gone:
(require-macros '[closh.core :refer [sh-str]])
(defn closh-prompt [] (sh-str fish -c fish_prompt))
Having intelligent tab completion would be great 🥇
Current tab-completion is a proof of concept. It uses node readline implementation of completion which has some limitations. I would like to address these by doing custom completion rendering. This will come later when we start on custom rendering and interactivity with escape sequences.
Limitations which will be addressed:
There is a trouble running a startup script on Windows. In order to make closh on Windows I imagine two ways could work:
If anyone uses Windows please give it a shot. Any help is appreciated.
Have you considered using POSIX Shell compatible syntax?
That would allow sourcing shell scrips (e.g. virtualenv activate).
As far I can see, POSIX Shell have following incompatibles with closh:
( ... )
is a subshell (example: cd /bin; (cd /;pwd); pwd
)|>
is parsed as | >
(example: ls / |> out.txt tac
is same as ls / | tac > out.txt
)#
is comment (so ls / | #(...)
<newline> tac
is same as ls / | tac
in POSIX shell, but is invalid in closh).One way of having compatible syntax is make sure that that every part of syntax of closh is either have same meaning in POSIX Shell or invalid in POSIX Shell. For example, prepend every clojure command with %
, and use |}
instead of |>
:
ls | %#(clojure.string/replace % #"\.txt" ".md")
ls |} %(reverse) | %(take 5)
Another one is using shopt
to enable/disable POSIX compatible mode:
shopt no_closh # only POSIX syntax allowed from now on
source ./bin/activate
ls_root() ( cd / && echo * | tr ' ' '\n' )
shopt closh # closh syntax is enabled back
ls_root |> (reverse)
$ ls |> (group-by (comp first (fn [x] (.toLowerCase x)))) | (take 1) | (map #(update % "xx" count))
readline.js:1017
throw err;
^
Error: Vector's key for assoc must be a number.
at cljs.core.PersistentVector.cljs$core$IAssociative$_assoc$arity$3 (<embedded>:1098:178)
at Object.cljs.core._assoc (<embedded>:275:106)
at Function.cljs.core.assoc.cljs$core$IFn$_invoke$arity$3 (<embedded>:490:88)
at Function.cljs.core.update.cljs$core$IFn$_invoke$arity$3 (<embedded>:1061:87)
at cljs.core.update (<embedded>:1059:86)
at evalmachine.<anonymous>:4:25
at <embedded>:983:205
at cljs.core.LazySeq.fn (<embedded>:983:210)
at cljs.core.LazySeq.sval (<embedded>:698:151)
at cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 (<embedded>:704:255)
✘-1 ~
Add some REPL server support so we can have closh backend and connect to it with different frontend readline implementations like omnia or rebel-readline.
It would be also cool to explore possibility to run REPL via clj
CLI tool.
Hi! This is awesome - thank you!
How to integrate paredit support and rainbow parens?
Clj/Cljs has been my primary scripting language for a while now, but it's a pain to deal with I/O and process control, so this hits the sweet spot. I think it would aid adoption to show users how to make closh their default shell :).
I've tried to re-install with the new master after the fix in issue 52, but I'm still getting errors when trying to run closh:
which closh
/Users/domparry/.nvm/versions/node/v8.9.3/bin/closh
➜ fulliautomatix git:(master) ✗ closh
Could not require closh.util in file closh/builtin.cljs
(new)
Function.cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:2024:72)
Function.cljs.analyzer.error.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:2639:92)
(NO_SOURCE_FILE <embedded>:5950:320)
(Object.lumo.repl.run_sync_BANG_)
Object.cljs.js.process_deps (NO_SOURCE_FILE <embedded>:5927:185)
Object.cljs.js.process_libs_deps (NO_SOURCE_FILE <embedded>:5930:60)
(NO_SOURCE_FILE <embedded>:5948:474)
(Object.lumo.repl.run_sync_BANG_)
Object.cljs.js.process_deps (NO_SOURCE_FILE <embedded>:5927:185)
Cannot find module 'tmp'
Function.Module._resolveFilename (module.cljs:542:15)
Function.Module._load (module.cljs:472:25)
Module.require (module.cljs:585:17)
require (internal/module.cljs:11:18)
(evalmachine.<anonymous>:6:18)
ContextifyScript.Script.runInThisContext (vm.cljs:50:33)
Object.runInThisContext (vm.cljs:152:38)
(Object._t)
lumo.repl.caching_node_eval (NO_SOURCE_FILE <embedded>:6481:68)
(NO_SOURCE_FILE <embedded>:5949:410)
➜ fulliautomatix git:(master) ✗
You can find these out with, for example, (prn closh.core/*closh-aliases*)
and (closh.core/expand-alias)
but there should be a more user-friendly way to access them.
@dundalek What do you think? Add an alias
or getalias
command (and corresponding commands for abbreviations and commands)?
Repro case:
(+ 1 2)
(abc) ; this throws but it prints 3 as a result of previous expression
Clojure REPL keeps the result of last command in variable *1
and previous results in *2
and *3
. However, this gets broken because we evaluate function that renders prompt after each command. The function used for evaluation is execute-text, the results are set in process-1-2-3
.
Possible solutions:
Closh doesn't process Ctrl-C while a command is running (maybe it doesn't pass it to the child process?). And when Ctrl-C is pressed at the prompt it exits (is that read-line trapping it?).
$ sleep 10
<press Ctrl-C>
<10 seconds later>
$
<closh exits>
Expected outcome is:
This is not an immediate concern but I am creating an issue for discussion and to collect currently existing approaches and maybe for someone to take a stab at it.
Parsing manual pages is a messy business since there is no single standard and there are many slight variations.
Existing approaches:
What I imagine:
man command
or command --help
or command -h
Therefore in cd && echo x
the echo command does not get executed. We could return true on the successful change dir, but then simple cd
would print to the output.
Conda uses a .sh script to start itself up, and running that script via source-shell
does no good.
$ conda activate
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If your shell is Bash or a Bourne variant, enable conda for the current user with
$ echo ". /Users/evar/anaconda/etc/profile.d/conda.sh" >> ~/.bash_profile
or, for all users, enable conda with
$ sudo ln -s /Users/evar/anaconda/etc/profile.d/conda.sh /etc/profile.d/conda.sh
The options above will permanently enable the 'conda' command, but they do NOT
put conda's base (root) environment on PATH. To do so, run
$ conda activate
in your terminal, or to put the base environment on PATH permanently, run
$ echo "conda activate" >> ~/.bash_profile
Previous to conda 4.4, the recommended way to activate conda was to modify PATH in
your ~/.bash_profile file. You should manually remove the line that looks like
export PATH="/Users/evar/anaconda/bin:$PATH"
^^^ The above line should NO LONGER be in your ~/.bash_profile file! ^^^
Would be a nice feature to add (read-line)
support (synchronously). Now I need to include a library like https://github.com/anseki/readline-sync
which seems a bit involved for a simple script.
Planck also has read-line
support which could serve as inspiration.
Is it possible to pass a script to closh, so you can execute a script from, say, bash?
bash$ closh myscript.closh
or
#!/usr/local/bin/closh
ls |> #(println (coun t%))
When parentheses are unbalanced and enter is pressed go to multiline mode. Lumo does this by checking isReadable.
Would be also cool to integrate parinfer.
I think it would help new users if the following features were explained with quick examples:
closh.sh
uses two features that just about every Unix-like has, but not macOS:
realpath
readlink -f
> bin/closh.sh
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname path
bin/closh.sh: line 10: realpath: command not found
usage: dirname path
usage: dirname path
bin/closh.sh: line 15: /lumo: No such file or directory
bin/closh.sh: line 15: exec: /lumo: cannot execute: No such file or directory
The solution needs to do the same thing with only POSIX tools. A refactor shouldn't be too terrible although it might be harder to cover edge cases. While we're at it, a test or two would probably be good.
I'll send a pull request when I get the chance.
This is an idea for some further time in future, but it may be cool to support reader macros somehow.
For example current single quoting functionality has a trade-off to be consistent with Clojure but it will fail to interpret common snippets from the internet. An example (brought by @eriktjacobsen in Gitter):
aws --profile profile-name ec2 describe-instances --filters "Name=tag:OwnerContact,[email protected]" --query 'Reservations[*].Instances[*].[InstanceId,InstanceType,NetworkInterfaces[*].[PrivateIpAddress],Tags[?Key==`Name`].Value]' --output text
If we had reader macros then user could fine tune these trade-offs to their preference.
Hi. I'm new to open source contributing and git, so sorry in advance for any silly misunderstandings.
I am not able to start Closh with npm. I have cloned both from my own fork and from the original repo with the same results. When using npm install
, I get the following #message:
`> [email protected] install /home/logan/Documents/closh/node_modules/deasync
node ./build.js
linux-x64-node-6
exists; testing
Binary is fine; exiting
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})`
and when using npm start
, I get this message:
`> [email protected] start /home/logan/Documents/closh
node ./bin/closh.js
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn lumo ENOENT
at exports._errnoException (util.js:949:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
at onErrorNT (internal/child_process.js:348:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Function.Module.runMain (module.js:577:11)
at startup (node.js:160:18)
at node.js:445:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node ./bin/closh.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/logan/.npm/_logs/2017-11-09T02_35_58_352Z-debug.log`
version of npm: 5.5.1
version of node: v6.1.0
Any idea where I'm going wrong here? Thank you!
P.S. I can't seem to figure out the formatting. If somebody wouldn't mind helping me out there as well, that would be very much appreciated.
We use built-in clojure reader to parse the command mode, but it does not accept some shell forms.
Possible approaches:
Interesting inspiration might be Racket, since it is so flexible defining new languages.
Current limitations I am aware of:
ping 8.8.8.8
ping "8.8.8.8"
ls *.{cljc,clj}
ls (expand "*.{cljc,clj}")
vim ~/.closhrc
git clone [email protected]:dundalek/closh.git
echo $USER/$DISPLAY
As you see, the prompt is eating a line from stdout:
upper -u | cat
My .powerline-shell.json:
{
"segments": [
"time",
"username",
"ssh",
"cwd",
"git",
"hg",
"jobs",
"exit_code",
"read_only",
"newline",
"root"
],
"theme": "~/anaconda/lib/python3.6/site-packages/powerline_shell/themes/solarized_light.py"
}
on this line you set the bin variable to be 'lumo'
Line 8 in 7f8a194
Then when node tries to execute line 25
Line 25 in 7f8a194
you get the spawn error because of this issue nodejs/node-v0.x-archive#5841
When typing and pressing enter while closh is starting there is a Cannot save history error because db is not yet initialized.
We should probably use a promise and queue the operations until the db is initialized.
I am zero in Node JS. Could someone advice me what need to do to fix it?
$ npm install -g lumo-cljs closh
/usr/local/bin/closh -> /usr/local/lib/node_modules/closh/bin/closh.js
/usr/local/bin/lumo -> /usr/local/lib/node_modules/lumo-cljs/bin/lumo.js
> [email protected] install /usr/local/lib/node_modules/lumo-cljs
> node scripts/npm_install.js || nodejs scripts/npm_install.js
Downloading [========================================] 2961197/bps 100% 0.0s
+ [email protected]
+ [email protected]
added 3 packages, removed 1 package, updated 2 packages and moved 64 packages in 22.908s
$ closh
Could not require closh.core in file closh/main.cljs
(new)
Function.cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:2024:72)
Function.cljs.analyzer.error.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:2639:92)
(NO_SOURCE_FILE <embedded>:5950:320)
(Object.lumo.repl.run_sync_BANG_)
Object.cljs.js.process_deps (NO_SOURCE_FILE <embedded>:5927:185)
Object.cljs.js.process_libs_deps (NO_SOURCE_FILE <embedded>:5930:60)
(NO_SOURCE_FILE <embedded>:5948:474)
(Object.lumo.repl.run_sync_BANG_)
Object.cljs.js.process_deps (NO_SOURCE_FILE <embedded>:5927:185)
Could not locate the bindings file. Tried:
→ /usr/local/lib/node_modules/closh/node_modules/deasync/build/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/build/Debug/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/build/Release/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/out/Debug/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/Debug/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/out/Release/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/Release/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/build/default/deasync.node
→ /usr/local/lib/node_modules/closh/node_modules/deasync/compiled/9.2.0/darwin/x64/deasync.node
bindings (/usr/local/lib/node_modules/closh/node_modules/bindings/bindings.cljs:88:9)
(/usr/local/lib/node_modules/closh/node_modules/deasync/index.cljs:34:32)
Object.<anonymous> (/usr/local/lib/node_modules/closh/node_modules/deasync/index.cljs:76:2)
Module._compile (module.cljs:641:30)
Object.Module._extensions..js (module.cljs:652:10)
Module.load (module.cljs:560:32)
tryModuleLoad (module.cljs:503:12)
Function.Module._load (module.cljs:495:3)
Module.require (module.cljs:585:17)
require (internal/module.cljs:11:18)
$ node -v
v9.5.0
$ npm -v
5.6.0
As for now one can use the JS interop to access and set environment variables:
echo (str js/process.env.VAR_NAME)
;; or
echo (expand "$VAR_NAME")
;; change with
(aset js/process.env "VAR_NAME" value)
Maybe we want to introduce helper functions like (setenv)
or (setenv!)
and (getenv)
?
Another thing is setting an env variable only for the child process, alternative to bash:
NODE_ENV=production npm start
As I am working on the signal handling I've been running into an issue that lumo installed via npm does not start directly but inside a js script running in node which spawns the lumo child process. Therefore pressing ctrl+c interrupts the parent process and pipe to the lumo process gets closed and closh errors out and exits.
To solve the issue we could do native exec to replace the process (using something like kexec, but it does not work on windows). Or run run the script directly with the lumo binary without the node wrapper.
There are couple of ways we could go:
Line 48 in 8696908
Isn't there a way to have lumo as a regular dependency?
(load-file "some/file.cljs")
(seems to be broken at the moment).(def decode-prompt (js/require "decode-prompt")
.(require 'libname.core)
. The trouble is with specifying classpath.
~/.m2/repository
When attempting to install closh i get the following error:
[2018-01-31T22_49_10_691Z-debug.log](https://github.com/dundalek/closh/files/1683596/2018-01-31T22_49_10_691Z-debug.log)
$ npm install -g lumo-cljs closh
/usr/local/bin/closh -> /usr/local/lib/node_modules/closh/bin/closh.js
/usr/local/bin/lumo -> /usr/local/lib/node_modules/lumo-cljs/bin/lumo.js
> [email protected] install /usr/local/lib/node_modules/lumo-cljs
> node scripts/npm_install.js || nodejs scripts/npm_install.js
Download failed.
sh: nodejs: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] install: `node scripts/npm_install.js || nodejs scripts/npm_install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jsiddall/.npm/_logs/2018-01-31T22_49_10_691Z-debug.log
OS: MacOS Sierra 10.12.6
Node: v9.4.0
NPM: 5.6.0
Node & NPM installed via pkg file from https://nodejs.org/en/
I've tried reinstalling Node/NPM multiple times and get the same problem.
For me the ~/.closh/closh.sqlite
file for the history is not created. There is neither a folder nor the file during or after execution of closh.
No error is printed either. It just doesn't happen.
Tested on macOS and Arch Linux. Installed via nmp install -g lumo-cljs closh
Any suggestions on how to debug this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.