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

completion: teach commands about bookmark names #4828

Merged
merged 2 commits into from
Nov 14, 2024
Merged

Conversation

senekor
Copy link
Contributor

@senekor senekor commented Nov 11, 2024

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

@senekor
Copy link
Contributor Author

senekor commented Nov 11, 2024

Note that I'm using git.push-bookmark-prefix as a heuristic for "own" bookmarks, which may not be a good idea. See this comment here:

I don't think it's good idea to suggest git.push-bookmark-prefix as a new name. It's the prefix for automatically-generated bookmarks.

@senekor senekor changed the title Remo/complete bookmarks completion: teach commands about bookmark names Nov 11, 2024
@senekor senekor mentioned this pull request Nov 11, 2024
18 tasks
@senekor senekor force-pushed the remo/complete-bookmarks branch from bd92b63 to ba989ce Compare November 11, 2024 13:33
@senekor senekor linked an issue Nov 11, 2024 that may be closed by this pull request
@senekor
Copy link
Contributor Author

senekor commented Nov 11, 2024

@yuja I removed the push prefix stuff from the other PR, but I still think it should make sense here. If a bookmark starts with the prefix I specifically configured, it's probably more relevant to me than other bookmarks, right?

@senekor senekor force-pushed the remo/complete-bookmarks branch from ba989ce to e47210f Compare November 11, 2024 21:02
cli/src/commands/bookmark/forget.rs Show resolved Hide resolved
cli/src/commands/bookmark/list.rs Show resolved Hide resolved
cli/src/commands/bookmark/untrack.rs Show resolved Hide resolved
cli/src/complete.rs Show resolved Hide resolved
cli/src/complete.rs Outdated Show resolved Hide resolved
cli/src/complete.rs Outdated Show resolved Hide resolved
cli/src/complete.rs Show resolved Hide resolved
cli/src/complete.rs Outdated Show resolved Hide resolved
@senekor senekor force-pushed the remo/complete-bookmarks branch from e47210f to 4baa3cc Compare November 12, 2024 20:29
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

cli/src/complete.rs Show resolved Hide resolved
cli/src/complete.rs Outdated Show resolved Hide resolved
cli/src/complete.rs Outdated Show resolved Hide resolved
cli/src/complete.rs Outdated Show resolved Hide resolved
cli/src/complete.rs Outdated Show resolved Hide resolved
cli/src/complete.rs Outdated Show resolved Hide resolved
@senekor senekor force-pushed the remo/complete-bookmarks branch 3 times, most recently from a4f5579 to 3b63576 Compare November 14, 2024 15:12
Completion functions need information from the config, e.g. for completing
user-configured aliases.
@senekor senekor force-pushed the remo/complete-bookmarks branch from 3b63576 to 081c6e2 Compare November 14, 2024 15:21
@senekor senekor merged commit c656fd3 into main Nov 14, 2024
31 checks passed
@senekor senekor deleted the remo/complete-bookmarks branch November 14, 2024 15:45
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.

Tab-complete branch names for jj branch subcommands
2 participants