Labs/Bespin/Commands: Difference between revisions

From MozillaWiki
< Labs‎ | Bespin
Jump to navigation Jump to search
No edit summary
 
Line 10: Line 10:
* [[Labs/Bespin/Commands/Cmdrm|cmdrm]]: remove a command from your special world
* [[Labs/Bespin/Commands/Cmdrm|cmdrm]]: remove a command from your special world


=== Built-in Commands ===
=== Built-in Commands ===


* [[Labs/Bespin/Commands/Help|help]]: The help gives you access to the various commands in the Bespin system. You can narrow the search of a command by adding an optional search params. If you pass in the magic hidden parameter, you will find subtle hidden commands. Finally, pass in the full name of a command and you can get the full description, which you just did to see this!
*[[Labs/Bespin/Commands/Help|help]]: The help gives you access to the various commands in the Bespin system. You can narrow the search of a command by adding an optional search params. If you pass in the magic hidden parameter, you will find subtle hidden commands. Finally, pass in the full name of a command and you can get the full description, which you just did to see this!  
* [[Labs/Bespin/Commands/Set|set]]: add a key and/or a value, else you will see all settings
*[[Labs/Bespin/Commands/Set|set]]: add a key and/or a value, else you will see all settings  
* [[Labs/Bespin/Commands/Files|files]]: list the top level files in a project. We need to make this more real and have the ability to "cd" and "ls" etc
*[[Labs/Bespin/Commands/Files|files]]: list the top level files in a project. We need to make this more real and have the ability to "cd" and "ls" etc  
* [[Labs/Bespin/Commands/Status|status]]: Tell you who you are logged in as and info on the file / project you re working on.
*[[Labs/Bespin/Commands/Status|status]]: Tell you who you are logged in as and info on the file / project you re working on.  
* [[Labs/Bespin/Commands/Project|project]]: show the current project, or set to a new one
*[[Labs/Bespin/Commands/Project|project]]: manage your projects (create, delete, rename, list, export)
* [[Labs/Bespin/Commands/Mkdir|mkdir]] path projectname: create a new directory in the given project
*[[Labs/Bespin/Commands/Mkdir|mkdir]] path projectname: create a new directory in the given project  
* [[Labs/Bespin/Commands/Save|save]] [project]: save the current contents
*[[Labs/Bespin/Commands/Save|save]] [project]: save the current contents  
* [[Labs/Bespin/Commands/Load|load]] filename: load up the contents of the file
*[[Labs/Bespin/Commands/Load|load]] filename: load up the contents of the file  
* [[Labs/Bespin/Commands/Preview|preview]] [filename]: view the file in a new browser window
*[[Labs/Bespin/Commands/Preview|preview]] [filename]: view the file in a new browser window  
* [[Labs/Bespin/Commands/Alias|alias]] alias command: define and show aliases for commands
*[[Labs/Bespin/Commands/Alias|alias]] alias command: define and show aliases for commands  
* [[Labs/Bespin/Commands/History|history]]: show history of the commands
*[[Labs/Bespin/Commands/History|history]]: show history of the commands  
* [[Labs/Bespin/Commands/Editconfig|editconfig]]: load up your config file
*[[Labs/Bespin/Commands/Editconfig|editconfig]]: load up your config file  
* [[Labs/Bespin/Commands/Runconfig|runconfig]]: run your config file
*[[Labs/Bespin/Commands/Runconfig|runconfig]]: run your config file  
* [[Labs/Bespin/Commands/Cmdload|cmdload]] commandname: load up a new command  
*[[Labs/Bespin/Commands/Cmdload|cmdload]] commandname: load up a new command  
* [[Labs/Bespin/Commands/Cmdedit|cmdedit]] commandname: edit the given command (force if doesn't exist)
*[[Labs/Bespin/Commands/Cmdedit|cmdedit]] commandname: edit the given command (force if doesn't exist)  
* [[Labs/Bespin/Commands/Cmdlist|cmdlist]]: list my custom commands
*[[Labs/Bespin/Commands/Cmdlist|cmdlist]]: list my custom commands  
* [[Labs/Bespin/Commands/Cmdrm|cmdrm]] commandname: delete a custom command
*[[Labs/Bespin/Commands/Cmdrm|cmdrm]] commandname: delete a custom command  
* [[Labs/Bespin/Commands/Newfile|newfile]] [filename] [project]: create a new buffer for a fie (save it)
*[[Labs/Bespin/Commands/Newfile|newfile]] [filename] [project]: create a new buffer for a fie (save it)  
* [[Labs/Bespin/Commands/Rm|rm]] filename: remove the file
*[[Labs/Bespin/Commands/Rm|rm]] filename: remove the file  
* [[Labs/Bespin/Commands/Closefile|closefile]] [filename] [project]: close the file (may lose edits)
*[[Labs/Bespin/Commands/Closefile|closefile]] [filename] [project]: close the file (may lose edits)  
* [[Labs/Bespin/Commands/Dashboard|dashboard]]: Navigate to the dashboard
*[[Labs/Bespin/Commands/Dashboard|dashboard]]: Navigate to the dashboard  
* [[Labs/Bespin/Commands/Version|version]] [command]: show the version of Bespin or a command
*[[Labs/Bespin/Commands/Version|version]] [command]: show the version of Bespin or a command  
* [[Labs/Bespin/Commands/Clear|clear]]: clear the current file
*[[Labs/Bespin/Commands/Clear|clear]]: clear the current file  
* [[Labs/Bespin/Commands/Goto|goto]] linenumber: move it! make the editor hed to your line number
*[[Labs/Bespin/Commands/Goto|goto]] linenumber: move it! make the editor hed to your line number  
* [[Labs/Bespin/Commands/Replace|replace]] search replace: add the search regex and then the replacement text
*[[Labs/Bespin/Commands/Replace|replace]] search replace: add the search regex and then the replacement text  
* [[Labs/Bespin/Commands/Action|action]] [actionname]: execute an editor action
*[[Labs/Bespin/Commands/Action|action]] [actionname]: execute an editor action  
* [[Labs/Bespin/Commands/Sort|sort]] [direction]: sort the current buffer
*[[Labs/Bespin/Commands/Sort|sort]] [direction]: sort the current buffer  
* [[Labs/Bespin/Commands/Export|export]] [project] [archivetype]: export the given project with an archivetype of zip or tgz
*[[Labs/Bespin/Commands/Export|export]] [project] [archivetype]: export the given project with an archivetype of zip or tgz  
* [[Labs/Bespin/Commands/Import|import]] url [project]: import the given URL as a project.
*[[Labs/Bespin/Commands/Import|import]] url [project]: import the given URL as a project.  
* [[Labs/Bespin/Commands/Trim|trim]] [side]: trim trailing or leading whitespace  
*[[Labs/Bespin/Commands/Trim|trim]] [side]: trim trailing or leading whitespace  
* [[Labs/Bespin/Commands/Bindkey|bindkey]] modifier key action: bind a key to an action
*[[Labs/Bespin/Commands/Bindkey|bindkey]] modifier key action: bind a key to an action  
* [[Labs/Bespin/Commands/Use|use]] type: bring patterns to code
*[[Labs/Bespin/Commands/Use|use]] type: bring patterns to code  
* [[Labs/Bespin/Commands/Template|template]] type: insert a given template
*[[Labs/Bespin/Commands/Template|template]] type: insert a given template  
* [[Labs/Bespin/Commands/Quota|quota]]: Let you know how much space you are using, and how much you have available
*[[Labs/Bespin/Commands/Quota|quota]]: Let you know how much space you are using, and how much you have available


=== Additional / User Submitted Commands ===
=== Additional / User Submitted Commands ===

Latest revision as of 03:49, 27 August 2009

Commands are made to be extended, and take from [Labs/Ubiquity] heavily (and are in fact merging so ideally you will be able to run Ubiquity commands from Bespin and vice versa).

To see what commands you have, type "help" in the command line.

To work with your own extra commands, you should look at the following commands, which all work on the special "BespinSettings/commands" directory, which is the home for your commands.

  • cmdlist: see which special commands you have
  • cmdload: load up a given named command (future: URL)
  • cmdedit: edit a given command
  • cmdrm: remove a command from your special world

Built-in Commands

  • help: The help gives you access to the various commands in the Bespin system. You can narrow the search of a command by adding an optional search params. If you pass in the magic hidden parameter, you will find subtle hidden commands. Finally, pass in the full name of a command and you can get the full description, which you just did to see this!
  • set: add a key and/or a value, else you will see all settings
  • files: list the top level files in a project. We need to make this more real and have the ability to "cd" and "ls" etc
  • status: Tell you who you are logged in as and info on the file / project you re working on.
  • project: manage your projects (create, delete, rename, list, export)
  • mkdir path projectname: create a new directory in the given project
  • save [project]: save the current contents
  • load filename: load up the contents of the file
  • preview [filename]: view the file in a new browser window
  • alias alias command: define and show aliases for commands
  • history: show history of the commands
  • editconfig: load up your config file
  • runconfig: run your config file
  • cmdload commandname: load up a new command
  • cmdedit commandname: edit the given command (force if doesn't exist)
  • cmdlist: list my custom commands
  • cmdrm commandname: delete a custom command
  • newfile [filename] [project]: create a new buffer for a fie (save it)
  • rm filename: remove the file
  • closefile [filename] [project]: close the file (may lose edits)
  • dashboard: Navigate to the dashboard
  • version [command]: show the version of Bespin or a command
  • clear: clear the current file
  • goto linenumber: move it! make the editor hed to your line number
  • replace search replace: add the search regex and then the replacement text
  • action [actionname]: execute an editor action
  • sort [direction]: sort the current buffer
  • export [project] [archivetype]: export the given project with an archivetype of zip or tgz
  • import url [project]: import the given URL as a project.
  • trim [side]: trim trailing or leading whitespace
  • bindkey modifier key action: bind a key to an action
  • use type: bring patterns to code
  • template type: insert a given template
  • quota: Let you know how much space you are using, and how much you have available

Additional / User Submitted Commands

  • calculate: Dion created a dumb little calculator command
  • doctype: ties into the doctype documentation and pops up info (e.g. doctype DivElement)
  • pastebox: Creates a new window where you can paste stuff in