forked from AUEB-BALab/blockly_unix
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add blocks for mv, rm and touch commands
- Loading branch information
1 parent
8505642
commit 9896ab6
Showing
6 changed files
with
411 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,72 @@ | ||
var rmBlock = { | ||
type: 'rm', | ||
message0: '%{BKY_RM}', | ||
category: 'File and Directory Operations', | ||
message1: 'remove %1', | ||
unix_description: [ | ||
{ | ||
command: 'rm %FILE', | ||
request_confirmation: '-i' | ||
force: '-f', | ||
request_confirmation: '-i', | ||
remove_directory: '-d', | ||
recursive: '-R', | ||
verbose: '-v', | ||
undelete: '-W', | ||
no_cross_mount: '-x' | ||
} | ||
], | ||
message0: '%{BKY_RM_REQUEST_CONFIRMATION}', | ||
args0: [ | ||
message1: '%{BKY_RM_FORCE}', | ||
args1: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'force', | ||
checked: false | ||
} | ||
], | ||
message2: '%{BKY_RM_REQUEST_CONFIRMATION}', | ||
args2: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'request_confirmation', | ||
checked: false // by default it's disabled | ||
checked: false | ||
} | ||
], | ||
args1: [ | ||
message3: '%{BKY_RM_REMOVE_DIRECTORIES}', | ||
args3: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'remove_directory', | ||
checked: false | ||
} | ||
], | ||
message4: '%{BKY_RM_RECURSIVE}', | ||
args4: [ | ||
{ | ||
type: 'field_input', | ||
name: 'FILE', | ||
text: 'file' // default file | ||
type: 'field_checkbox', | ||
name: 'recursive', | ||
checked: false | ||
} | ||
], | ||
message5: '%{BKY_RM_VERBOSE}', | ||
args5: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'verbose', | ||
checked: false | ||
} | ||
], | ||
message6: '%{BKY_RM_NO_CROSS_MOUNT}', | ||
args6: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'no_cross_mount', | ||
checked: false | ||
} | ||
], | ||
extensions: [], | ||
style: 'File and Directory Operations', | ||
previousStatement: 'Action', | ||
nextStatement: 'Action', | ||
tooltip: 'Διαγράφει αρχεία και καταλόγους.', | ||
tooltip: '%{BKY_RM_TOOLTIP}', | ||
helpUrl: 'https://linux.die.net/man/1/rm' | ||
}; | ||
|
||
Blockly.defineBlocksWithJsonArray([rmBlock]); | ||
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.