aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-08-30 16:03:00 +0200
committerAdrian Kummerlaender2015-08-30 16:03:00 +0200
commit04e05dc33d64aba28a84fc9af4268e14c2abd965 (patch)
tree3874ba821a2409f4f255cb33c507b43fcccb7da5
parent8a41deb8707dd5d19abf4e4eda15f8a32700ffb1 (diff)
downloadMetaTerm-04e05dc33d64aba28a84fc9af4268e14c2abd965.tar
MetaTerm-04e05dc33d64aba28a84fc9af4268e14c2abd965.tar.gz
MetaTerm-04e05dc33d64aba28a84fc9af4268e14c2abd965.tar.bz2
MetaTerm-04e05dc33d64aba28a84fc9af4268e14c2abd965.tar.lz
MetaTerm-04e05dc33d64aba28a84fc9af4268e14c2abd965.tar.xz
MetaTerm-04e05dc33d64aba28a84fc9af4268e14c2abd965.tar.zst
MetaTerm-04e05dc33d64aba28a84fc9af4268e14c2abd965.zip
Defer command interpretation to `sh`
Otherwise one can not easily enter more complex shell commands such as pipe chains and so on. The goal of _MetaTerm_ is not to implement a new shell language but to facilitate existing ones which is why this is best deferred to an existing application.
-rw-r--r--src/widget/EmbeddedTerminal.qml12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/widget/EmbeddedTerminal.qml b/src/widget/EmbeddedTerminal.qml
index 497bf49..d8c89d4 100644
--- a/src/widget/EmbeddedTerminal.qml
+++ b/src/widget/EmbeddedTerminal.qml
@@ -56,16 +56,8 @@ Item {
initialWorkingDirectory: item.workingDirectory
- shellProgram: {
- return (item.program).split(" ")[0];
- }
-
- shellProgramArgs: {
- const elements = (item.program).split(" ");
- elements.shift();
-
- return elements;
- }
+ shellProgram: 'sh'
+ shellProgramArgs: [ '-c', program ]
onFinished: {
clearScreen();