improve next-in-path handling, fix line endings
This commit is contained in:
parent
f546b49599
commit
31a59f0207
14 changed files with 62 additions and 48 deletions
|
|
@ -1,5 +1,12 @@
|
|||
#!/bin/zsh
|
||||
#dep:node
|
||||
local SELF=$(realpath "$0")
|
||||
source ${$(realpath "$0"):h:h}/lib/next-in-path.zsh
|
||||
export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history
|
||||
$(next-in-path node $0) $@
|
||||
NEXT=$(next-in-path node $0)
|
||||
if (( $? != 0 )); then exit 1; fi
|
||||
if [[ $NEXT == $SELF ]]; then
|
||||
exec /usr/bin/node $@
|
||||
else
|
||||
exec $NEXT $@
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue