Default value for all commands #285
Replies: 2 comments 1 reply
-
Hi, I'll post just quickly here. Yea, you are correct about the current behavior. Setting a default value for custom variables is currently only possible on a per shell command basis. Background: This was just a way for me to limit the scope of development when I first programmed the custom variables feature together with Prompts. These two features required a lot of development on the variable parsing process, so I decided to limit this default value functionality a bit in order to define at least some limits for the amount of work back then. I was thinking about this kind of global default value support, too, but in addition to the work amount, I also wanted to take some time to think and gather experience to see if a global default value support is really needed. And yes, it is! I can clearly see that this would be a handy feature to have and there is nothing blocking this kind of development. It would be good time for this as now the custom variables have been around for a good amount of time so I know which way to develop them further. 👍 Thank you for your suggestion! 🙂 I'll read and wanswer your other post later some other day. Generally my week days are quite busy, sometimes weekends too. |
Beta Was this translation helpful? Give feedback.
-
Under constructionI'm trying to get this implemented for |
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.
-
This is something I ran into while implementing my scripts (see #108). Correct me if I'm wrong, but custom variables can only have a default variable on a per-command basis. There (currently) isn't a way to set a default value for every single command.
My rationale for this is keeping a variable for my vault's local
bin
folder that contains my executables. I can use this in commands similar to how I would use{{folder_path:relative}}
, so that if for whatever reason I rename mybin
folder (or any of it's parent folders), I don't have to manually go through every command and update the path.I did add the folder to
$PATH
, but it only works for commands (such asgrep
), not for files (such asgrep file.md
).Beta Was this translation helpful? Give feedback.
All reactions