Macros are not calling autocomplete functions but aliases do #1350
Replies: 7 comments 14 replies
-
@kmvanbrunt This question is up your alley ... |
Beta Was this translation helpful? Give feedback.
-
Because macros do not resolve until after hitting Enter, tab completion will only complete paths while typing a macro. When I wrote this feature 6 years ago, I remember having a lot of trouble solving how to implement tab completing macros in the way you are asking. It gets complicated since arguments can be used in any order in a resolved macro. A later argument could determine what to tab complete in an earlier argument. Here is an extreme example: Running Therefore I couldn't tab complete the first argument without first knowing what the second argument was. Additionally, an argument number can be repeated in a macro: Lastly macros can resolve into other macros and aliases. So there is a lot of state to keep track of. |
Beta Was this translation helpful? Give feedback.
-
@Sripadvallabh Absolutely, |
Beta Was this translation helpful? Give feedback.
-
Macros are a feature we wish we hadn't created because there are so many nasty edge cases. We plan to remove them in the 3.0 release. |
Beta Was this translation helpful? Give feedback.
-
@Sripadvallabh We can investigate if macros are something that can be supported via a plugin. That is a potentially good idea. I'd appreciate it if you could share details of your use case. That could help us understand the benefits. My email is <first_name>.<last_name>@gmail.com and my full name is in my GitHub profile. |
Beta Was this translation helpful? Give feedback.
-
Not sure if it's too late to chime in on macros. I find them very useful despite lack of autocomplete. Some command can call sub-commands and it can get verbose, e.g. the find command can run a command string given by --cmd CMD on each matched object. I will work on improving syntax of the find command, but right now I'd be very sad to lose macros, they cut typing effort significantly (I was planning to include macros in upcoming demo videos. Now I'm not sure what to do.) Here is a list of my favourite macros. And I'm discovering new tricks all the time gn
|
Beta Was this translation helpful? Give feedback.
-
We listened to user feedback and have restored macros in PR #1464 . At the same time we added |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a possible way for macros to call autocomplete functions in case their placeholder arguments are given to the macro??
Basically i have a situation as follows:
When i invoke the command
'xd new_word <TAB>'
is there a way to expect the autocompletion list as in"words d new_word <TAB>"
?????But if i just have an alias it autocompletes the next word in sequence.
Beta Was this translation helpful? Give feedback.
All reactions