Personal tools

Labs/Bespin/Commands

From MozillaWiki

Jump to: navigation, search

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