Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

633 add support for user defined commands #766

Merged
merged 6 commits into from
Jan 3, 2025

Conversation

wd60622
Copy link
Collaborator

@wd60622 wd60622 commented Dec 31, 2024

Describe what this PR does / why we need it

This allows users to pass additional commands to their config

Includes:

  • autocomplete in :Octo <tab>
  • Added to picker with :Octo<CR>
require("octo").setup {
  ..., 
  commands = {
    auth = {
      status = function()
        local output = vim.fn.system("gh auth status --active")
        vim.notify(output)
      end, 
    },
  },
}

Related to #743 CC @uwla

Does this pull request fix one issue?

Describe how you did it

Extend the M.commands table at setup with new configuration option commands which has a default of {}

Describe how to verify it

  1. Add some new command to your configuration
  2. Try the autocomplete with :Octo <tab>
  3. Try the picker with :Octo<CR>

Special notes for reviews

Checklist

  • Passing tests and linting standards
  • Documentation updates in README.md and doc/octo.txt

@wd60622 wd60622 linked an issue Dec 31, 2024 that may be closed by this pull request
@wd60622 wd60622 merged commit 74ae56d into master Jan 3, 2025
4 checks passed
@wd60622 wd60622 deleted the 633-add-support-for-user-defined-commands branch January 3, 2025 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for user defined commands
1 participant