Skip to content

Commit

Permalink
stringify non string commands in set_command
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Feb 17, 2018
1 parent 1eed0db commit 69a7f3e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### Bugfixes
* fix urls ending with slash [#365](https://github.com/jcubic/jquery.terminal/issues/365)
* stringify non string commands in set_command

## 1.11.4
* handle non string and functions in error the same as in echo
Expand Down
7 changes: 5 additions & 2 deletions js/jquery.terminal-1.11.4.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* Copyright (c) 2007-2013 Alexandru Marasteanu <hello at alexei dot ro>
* licensed under 3 clause BSD license
*
* Date: Sun, 11 Feb 2018 17:32:49 +0000
* Date: Sat, 17 Feb 2018 15:53:32 +0000
*/

/* TODO:
Expand Down Expand Up @@ -2814,7 +2814,7 @@
}
$.terminal = {
version: 'DEV',
date: 'Sun, 11 Feb 2018 17:32:49 +0000',
date: 'Sat, 17 Feb 2018 15:53:32 +0000',
// colors from http://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -6143,6 +6143,9 @@
set_command: function(command, silent) {
when_ready(function ready() {
// TODO: refactor to use options - breaking change
if (typeof command !== 'string') {
command = JSON.stringify(command);
}
command_line.set(command, undefined, silent);
});
return self;
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal-1.11.4.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions js/jquery.terminal-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -6143,6 +6143,9 @@
set_command: function(command, silent) {
when_ready(function ready() {
// TODO: refactor to use options - breaking change
if (typeof command !== 'string') {
command = JSON.stringify(command);
}
command_line.set(command, undefined, silent);
});
return self;
Expand Down
7 changes: 5 additions & 2 deletions js/jquery.terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* Copyright (c) 2007-2013 Alexandru Marasteanu <hello at alexei dot ro>
* licensed under 3 clause BSD license
*
* Date: Sun, 11 Feb 2018 17:32:49 +0000
* Date: Sat, 17 Feb 2018 15:53:32 +0000
*/

/* TODO:
Expand Down Expand Up @@ -2814,7 +2814,7 @@
}
$.terminal = {
version: 'DEV',
date: 'Sun, 11 Feb 2018 17:32:49 +0000',
date: 'Sat, 17 Feb 2018 15:53:32 +0000',
// colors from http://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -6143,6 +6143,9 @@
set_command: function(command, silent) {
when_ready(function ready() {
// TODO: refactor to use options - breaking change
if (typeof command !== 'string') {
command = JSON.stringify(command);
}
command_line.set(command, undefined, silent);
});
return self;
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal.min.js

Large diffs are not rendered by default.

0 comments on commit 69a7f3e

Please sign in to comment.