GitHub Slash Commands

GitHub have recently released slash commands, which allow you to create complex Markdown such as tables, task lists and code blocks to name a few with minimal typing and effort!

So lets dive into what commands there are and see what they can do!


This content originally appeared on DEV Community and was authored by Kera Cudmore

GitHub have recently released slash commands, which allow you to create complex Markdown such as tables, task lists and code blocks to name a few with minimal typing and effort!

So lets dive into what commands there are and see what they can do!

Where can I use slash commands?

Slash commands can be used in description or comment fields in issues, pull requests, or discussions (where supported).

Current Slash Commands

Using the slash command is simple - just type the command in the description/comment box and then follow the prompts to create your custom markdown.

/table

Creates a markdown table. You will be prompted to choose the number of rows and columns.

Image from Gyazo

/code

Creates a markdown code block. You will be prompted to choose the language for the code block, or you can select no syntax if your language is not currently supported.

Image from Gyazo

/template

Shows you all the templates available within that repository for you to select and insert. This command works with issue templates and pull request templates.

Image from Gyazo

/details

Creates a collapsible detail area within the description/issue. Simply add the title and content.

Image from Gyazo

/savedreplies

Inserts a saved reply from your account.

If you add %cursor% to the saved reply template, the slash command will place the cursor in that spot when you insert the template. This is great for allowing you to quickly customise your template, for example adding a name etc.

Image from Gyazo

/tasklist

Creates a tasklist. This command only works in issue descriptions.

As the tasklist command is currently in private beta, it may not be available to all users, unfortunately I'm one of those users, so no gif for tasklists ☹️

Further Reading

I'd love to know in the comments if you plan to implement these commands in your workflow, or what command would you create to save time?


This content originally appeared on DEV Community and was authored by Kera Cudmore


Print Share Comment Cite Upload Translate Updates
APA

Kera Cudmore | Sciencx (2023-05-04T12:09:03+00:00) GitHub Slash Commands. Retrieved from https://www.scien.cx/2023/05/04/github-slash-commands/

MLA
" » GitHub Slash Commands." Kera Cudmore | Sciencx - Thursday May 4, 2023, https://www.scien.cx/2023/05/04/github-slash-commands/
HARVARD
Kera Cudmore | Sciencx Thursday May 4, 2023 » GitHub Slash Commands., viewed ,<https://www.scien.cx/2023/05/04/github-slash-commands/>
VANCOUVER
Kera Cudmore | Sciencx - » GitHub Slash Commands. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/05/04/github-slash-commands/
CHICAGO
" » GitHub Slash Commands." Kera Cudmore | Sciencx - Accessed . https://www.scien.cx/2023/05/04/github-slash-commands/
IEEE
" » GitHub Slash Commands." Kera Cudmore | Sciencx [Online]. Available: https://www.scien.cx/2023/05/04/github-slash-commands/. [Accessed: ]
rf:citation
» GitHub Slash Commands | Kera Cudmore | Sciencx | https://www.scien.cx/2023/05/04/github-slash-commands/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.