Comments (7)
FWIW, this is the shellcheck output:
In arrlit.sh line 2:
component=foo
^-- SC2034: component appears unused. Verify it or export it.
In arrlit.sh line 3:
foo_tasks=(a b c)
^-- SC2034: foo_tasks appears unused. Verify it or export it.
In arrlit.sh line 4:
eval tasks=(\${${component}_tasks[@]})
^-- SC1036: '(' is invalid here. Did you forget to escape it?
^-- SC1088: Parsing stopped here. Invalid use of parentheses?
^-- SC1098: Quote/escape special characters when using eval, e.g. eval "a=(b)".
It works in osh with the eval quoted as suggested in the last line.
from oil.
Thanks for trying this! Yes if you are willing to change it for OSH, I would suggest using the quotes as ShellCheck suggests.
Parsing array literal words is sort of a special case that I've limited to local
/ declare
/ etc. With eval
, it makes sense to always use quotes, since eval
is supposed to take a string.
If adding quotes gets you past this, please let me know what other errors you run into! thanks.
from oil.
After tweaking several instances of the problem, I get:
Traceback (most recent call last):
File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 174, in _r
un_module_as_main
File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 72, in _ru
n_code
File "/home/andy/git/oilshell/oil/bin/oil.py", line 509, in <module>
File "/home/andy/git/oilshell/oil/bin/oil.py", line 492, in main
File "/home/andy/git/oilshell/oil/bin/oil.py", line 475, in OilMain
File "/home/andy/git/oilshell/oil/bin/oil.py", line 413, in OshMain
File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 985, in Execu
te
File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 949, in _Exec
ute
File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 758, in _Disp
atch
File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 978, in _Exec
uteList
File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 949, in _Exec
ute
File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 845, in _Disp
atch
NotImplementedError: 14
FATAL: couldn't import from app bundle '/home/jbrown/bin/oil.ovm' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
I'm not sure exactly what construct is causing that...
from oil.
Also,
osh warning: *** trap not implemented ***
from oil.
OK thanks for the report, the error message is bad because it just says construct "14". Issue #38 is related. It looks like I have to provide a better error or just implement that. Let me see if I can reproduce.
from oil.
I guess you've figured this out, but this is issue #66.
Thanks!
from oil.
Thanks, I'm closing this since you addressed it and issue #66 is fixed (still pending release).
from oil.
Related Issues (20)
- SIGINT and SIGTSTP breaks out of loops in bash/zsh, but not OSH HOT 6
- Implement shopt -s autocd HOT 3
- Error message shows wrong/confusing position for long commands HOT 3
- command -v "$emptyvar" returns zero HOT 3
- Oils 0.23.0 TODO
- Missing "Str=>lower()"
- Abort with += on missing dict key
- intermittent crash running amd-test script -- reproducible in dbg, opt HOT 4
- OpenBSD doesn't have RLIMIT_AS
- Add pp [x + 42] to print an expression and its value - like Rust dbg!() HOT 2
- github URL pastebin HOT 8
- bash allows pasting multi-line code snippets, but OSH/YSH don't HOT 3
- allow backspace from multiline expressions HOT 1
- allow any custom prompts HOT 2
- typeof / reflection / assign results of '=' HOT 3
- emoji/unicode identifiers
- Setting up GNU readline history HOT 1
- 'view latest' released version in documentation - because old links are often surfaced HOT 1
- crash in parsing return HOT 1
- BashArray could have a sparse representation (ble.sh)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oil.