Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Command Line

sstallionsstallion929 downloads

Copy command lines from your notes to the clipboard.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates4

This plugin adds enhanced support for command line code blocks to Obsidian.

Features

  • Copy command lines from your notes without selecting text.
  • Prompts and output are removed from clipboard contents to support pasting into terminal sessions.
  • Default prompts are provided for command lines that do not specify one.
  • Optional syntax highlighting and styling using Prism Command Line.
  • Optional support for removing unnecessary white space from clipboard contents.
  • Supports mobile and desktop.

Getting Started

Command line code blocks are identified using one of the following languages:

Name Highlight Prompt Pattern Default Prompt Continuation
command-line N/A Any below C:\> Any below
batch-command batch /\S*?>/ C:\> ^
powershell-command powershell /\S*?>/ PS> `
shell-command shell /\S*?[#$%]/ $ \

For example, copying the following code block to the clipboard will remove the prompt and output while preserving line continuations and white space:

```shell-command
$ command with \
    line continuation
and output, which will be removed
from the clipboard.
```

[!NOTE] If clipboard normalization is enabled in Settings, unnecessary white space (including line continuations) will be removed in addition to the prompt and output.

Contributing

Pull requests are welcome! See CONTRIBUTING.md for details.

License

Source code in this repository is licensed under a Simplified BSD License. See LICENSE for details.

HealthGood
ReviewCaution
About
Copy command-line code blocks to the clipboard without selecting text, stripping prompts and command output so pasted text is terminal-ready. Preserve line continuations and whitespace, provide Prism-based syntax highlighting and prompt defaults, and support both mobile and desktop.
CodeFormattingSyntax
Details
Current version
1.2.0
Last updated
Last year
Created
2 years ago
Updates
4 releases
Downloads
929
Compatible with
Obsidian 1.8.0+
Platforms
Desktop, Mobile
License
BSD-2-Clause
Report bugRequest featureReport plugin
Author
sstallionsstallion
github.com/sstallion
GitHubsstallion
  1. Community
  2. Plugins
  3. Code
  4. Command Line

Related plugins

VSCode Editor

Edit Code Files like VSCode.

Fountain Editor

Fountain (screenplay) syntax highlighting in the editor.

Shiki Highlighter

Highlight code blocks with Shiki.

Code Editor

Edit non-markdown text files (code, config, data) directly with syntax highlighting, line numbers, and word wrap.

Linter

Format and style your notes. Linter can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular Markdown contents like list, italics, and bold styles; and more with the use of custom rule options.

Admonition

Admonition block-styled content.

Mermaid Tools

Improved Mermaid.js experience: visual toolbar with common elements and more.

Editing Toolbar

The Editing Toolbar is modified from cMenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.

Templater

Create and use dynamic templates.

Image Captions

Add captions to images with inline Markdown and link support. The caption format is compatible with the Commonmark spec and other Markdown applications.