The @full[] built-in function sadly leads to an error message displayed, if the argument is empty.
This is an eg issue when defining an alias to invoke a plain text editor to alternatively open an existing (or implicitly created) file that should be @full-expanded -or- fire it up without a given file:
would produce an error message if invoked without an argument.
This function with kind of a delayed expansion hack is what I came up with to my rescue (.ini escaping):
You can call it with a second parameter specifying a default value to be used if the first one is empty. The above mentioned alias would then read as simply
This is an eg issue when defining an alias to invoke a plain text editor to alternatively open an existing (or implicitly created) file that should be @full-expanded -or- fire it up without a given file:
alias ue=`"%programfiles%\UltraEdit\Uedit32.exe" @full[%1]`
would produce an error message if invoked without an argument.
This function with kind of a delayed expansion hack is what I came up with to my rescue (.ini escaping):
fullne=%@if["%@unquote[%1]"=="",%2,"%%%@left[1,@]full[%1]"]
You can call it with a second parameter specifying a default value to be used if the first one is empty. The above mentioned alias would then read as simply
alias ue=`"%programfiles%\UltraEdit\Uedit32.exe" @fullne[%1]`