Command Line
by Steven Stallion
Score: 35/100
favorite
share
Description
Category: Coding & Technical Tools

The Command Line plugin enhances how command line code blocks are handled in Obsidian, streamlining workflows for users who document or share terminal commands. It allows copying commands directly from code blocks without manually selecting text, automatically stripping out prompts and command output so the clipboard content is clean and ready to paste into a terminal. The plugin supports different command-line styles, including shell, batch, and PowerShell, with automatic prompt detection and default values for each type.

Stats
3
stars
26
downloads
0
forks
5
days
5
days
5
days
12
total PRs
0
open PRs
2
closed PRs
10
merged PRs
4
total issues
3
open issues
1
closed issues
0
commits
Latest Version
5 days ago
Changelog

Changed

  • Added command-line as an alternative to highlighted languages
README file from

Command Line




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.

Similar Plugins
info
• Similar plugins are suggested based on the common tags between the plugins.
Copy document as HTML
2 years ago by mvdkwast
Obsidian plugin: copy document as HTML, including images
Numerals
2 years ago by RyanC
An obsidian plugin which turns a math code block into a full featured calculator
Terminal
2 years ago by polyipseity
Integrate consoles, shells, and terminals.
Console Markdown Plugin
2 years ago by Daniel Ellermann
An Obsidian plugin which renders console commands and their output.
Image To Lskypro
2 years ago by NekouTarou
支持直接上传图片到图床Lsky,基于https://github.com/renmu123/obsidian-image-auto-upload-plugin.git改造。
Copy Inline Code
2 years ago by Ondrej Zavodny
Gnome Terminal Loader
2 years ago by David Carmichael
Publish URL
a year ago by Hananoshika Yomaru
copy the publish url to clipboard
Copy Image
a year ago by Felipe D.S. Lima
Easily copy image to clipboard by right clicking image.
Paste From History
a year ago by Daniel Karakka
Obsidian plugin that adds the ability to paste text from Obsidian's clipboard history.
Recursive Copy
7 months ago by datawitch
Extract Highlights
4 years ago by Alexis Rondeau
Manage your highlights in Obsidian by easily creating, removing and exporting them.
JSONifier
4 years ago by Kjell Connelly
Show Current File Path
4 years ago by Ravi Mashru
Obsidian plugin to show the file path of the current file in the status bar
Image auto upload
4 years ago by renmu123
auto upload image with picgo
Image Uploader
4 years ago by Creling
Relative Find
4 years ago by phibr0
Shell commands
4 years ago by Jarkko Linnanvirta
Execute system commands via hotkeys or command palette in Obsidian (https://obsidian.md). Some automated events are also supported, and execution via URI links.
Advanced Copy
5 months ago by leschuster
An Obsidian plugin to copy Markdown and transform it into HTML, Anki, or any custom format. Create custom profiles with versatile templates tailored to your workflow.
Export to HTML
3 months ago by kalvn
Export a note as HTML in the clipboard or in a file.
Smart Context
3 months ago by 🌴 Brian
Hanko
2 months ago by Telehakke
Obsidian plugin.
Confluence Converter
a month ago by Addo Zhang
An Obsidian Plugin for Confluence
Paste Image Into Property
a month ago by Nito