Skip to content

Allow more complex parameters #5

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thomasjachmann
Copy link

This will allow to combine the bang command with additional parameters and also include placeholders % and + in your command parameters that will be expanded into the current file path and the cursor's line number.

This way, you can create all kinds of calls to tig like:

  • Tig! blame + to get a blame view of the current file with the current line highlighted
  • Tig! main --first-parent get a list of all direct commits to the current file on the current branch

The file name placeholder expansion is a bit redundant with the bang command version but I just included it so maybe some specific uses that require a more complex command setup might work.

Before, it was either possible to use the bang command or specify
further parameters. Now, you can combine them, eg for:

:Tig! blame

This will open the blame view for a file by executing:

tig blame -- <current_file_name>

Also, the double dash was added in front of the current file name for
better distinction between parameters and paths.
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.

1 participant