-
-
Notifications
You must be signed in to change notification settings - Fork 809
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
Tab expansion starting with '#' needs to be escaped #293
Comments
This applies to any string that starts with For the record, you can either escape ( |
Yup, |
PowerShell will automatically quote paths during tab expansion that contain special chars or spaces. I'm guessing we could do something similar when tab expanding branch names. How about remote names? Can you have special chars in remote names as well? |
Yep. I'm inclined to add a guard against special characters in any tab completed string. |
@dahlbyk There are some tab completed strings that are already escaped via single quotes (stashes and TF shelvesets). |
@rkeithhill - I think I've solved this problem completely in TabExpansionPlusPlus, see https://github.com/lzybkr/TabExpansionPlusPlus/blob/master/TabExpansionPlusPlus.psm1#L64 - feel free to take that code as you see fit (I guess V3 and beyond only). |
When using tab-expansion on branch-names, if they start with '#' then it, and the rest of the line will get ignored by powershell since '#' marks the start of a line comment. Escaping it with ` does help though, e.g.:
git checkout
#1-branch-name`
This is only necessary when the name starts with the pound-sign though, as names like
feature/#1-branch-name
works fine without any escaping.The text was updated successfully, but these errors were encountered: