Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Function or Alias - Does it matter?
- X-seq: zsh-users 19407
- From: TJ Luoma <luomat@xxxxxxxxx>
- To: Zsh-Users List <zsh-users@xxxxxxx>
- Subject: Function or Alias - Does it matter?
- Date: Tue, 18 Nov 2014 19:13:16 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=20120113;        h=mime-version:from:date:message-id:subject:to:content-type;        bh=H1LSajOiOsu0hO1thMup2DSeWOFIouk2fAnb4FxSxKk=;        b=Fu4YpROokhvgDHVqJNVoj5elNtDx3oYFvgNy7wLwaJ3riVeU3xKy3pbd+gu5vQqCpP         n4p30lmigPQunxjbmuQHzstMEM46DioxUlQa/ZhihZp4LFNWziLkZ5XmHQW4WPdU4xry         0fMyqtHsqRk68A2tD0gGoOzF4kX4hOEPrNmNKveY4guZJ6Q0010JpGrellE3BoAo0eht         0zfY/uU9eZ6U1DI17SbOciZjbxs9NTKkKyFICXHCIzkeTFtba/SjSDfNev9KBVsjeM82         3XVwu2Pw6/knPoq/YvriDKje+xICd7XuzU3eP8UhXK6jUPw26I1joyzcc87plnWjXZi3         q+8A==
- 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
Is there any practical difference between making an alias or a
function if they do the same thing?
For example, these are (as far as I know) functionally identical:
         function timestamp_r { strftime "%Y/%m/%d at %-I:%M:%S %p"
"$EPOCHSECONDS" }
         alias timestamp_r='strftime "%Y/%m/%d at %-I:%M:%S %p" "$EPOCHSECONDS"'
Is there any reason to prefer one or the other?
Tj
Messages sorted by:
Reverse Date,
Date,
Thread,
Author