GitHub Slash Commands

GitHub Slash Commands Banner

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?

GithubTips
Avatar for Kera Cudmore

Written by Kera Cudmore

Junior Software Developer at the Met Office | Code Institute Alumna.

Loading

Fetching comments

Hey! 👋

Got something to say?

or to leave a comment.