Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Can an alias ever have a dynamic element?
- X-seq: zsh-users 18241
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Can an alias ever have a dynamic element?
- Date: Tue, 17 Dec 2013 09:15:56 -0800
- In-reply-to: <XnsA2999C087BB98davidrayninfocouk@80.91.229.13>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <XnsA2999C087BB98davidrayninfocouk@80.91.229.13>
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