Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Can an alias ever have a dynamic element?



On Dec 17,  3:20pm, zzapper wrote:
}
} I have an alias which creates a tar with a date component in its name
} that date is however evaluated when the shell is created which could
} have been a few days ago. The easy solution is to create a script but
} is they any alternative?

This usually means you've created the alias with something like:

    alias thingy="foo $(date)"

when what you need are single rather than double quotes:

    alias thingy='foo $(date)'

Always best if you actually show us an example rather than attempt to
describe it in prose.



Messages sorted by: Reverse Date, Date, Thread, Author