Skip to content

Latest commit

Β 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

zsh-linear-open πŸ§‘β€πŸ’»

Type linear open to open the Linear issue associated with your current Git branch in your browser.

Demo of linear open in action

Rationale

A lot of Linear users have GitHub integration enabled and use the Copy git branch name action (Cmd/Ctrl+Shift+. or Ctrl+Shift+.) to copy the git branch name when starting to work on an issue. If you are following the intended convention of prefixing the branch name with the issue key, this plugin allows you to open the issue directly in your browser by typing linear open. The plugin also supports customized base URL's for opening the issue.

Usage

linear open
Opening REM-471 β†’ https://linear.app/issue/REM-471

The current branch name is scanned for a Linear issue key (e.g. PRO-125, ENG-42). All of the formats from Linear's "Copy branch name" work:

  • username/proj-123-feature-description
  • PROJ-123-feature-description
  • proj-123
  • feature/HOW-42

Installation

The following sections describe how to install the plugin for different plugin managers.

Oh My Zsh (recommended)

1. Install the plugin

git clone https://github.com/arienshibani/linear-open.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/linear-open

2. Add linear-open to plugins=(...) in ~/.zshrc.

plugins=(
  git
  linear-open
)

3. Restart your shell to load the plugin.

source ~/.zshrc

Add antigen bundle arienshibani/linear-open to your .zshrc with your other bundle commands.

Antigen will handle cloning the plugin for you automatically the next time you start zsh. You can also add the plugin to a running zsh with antigen bundle arienshibani/linear-open for testing before adding it to your .zshrc.

zplug "arienshibani/linear-open"

Then zplug install and zplug load.

Add zgenom load arienshibani/linear-open to your .zshrc where your other zgenom load calls are. Run zgenom reset (or regenerate) and restart the shell so the plugin is picked up.

Requirements

  • Zsh (tested on v5.0+)
  • Git
  • A browser opener (open, xdg-open, or powershell.exe / cmd.exe)

Configuration

Optional environment variable (set in ~/.zshrc):

# Default: https://linear.app/issue
# Linear's /issue/KEY URL redirects into your workspace.
# Use a workspace-scoped base if you prefer a direct URL:
export LINEAR_OPEN_BASE_URL="https://linear.app/your-workspace/issue"

Inspired by

β€” Inspired by git-open.

License

Copyright linear-open contributors. Licensed under MIT. http://opensource.org/licenses/MIT

About

πŸ”Œ Type `linear open` to open the Linear issue page for a repository in your browser.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages