zsh-users
 help / color / mirror / code / Atom feed
* Function or Alias - Does it matter?
@ 2014-11-19  0:13 TJ Luoma
  2014-11-19  0:45 ` James Pearson
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: TJ Luoma @ 2014-11-19  0:13 UTC (permalink / raw)
  To: Zsh-Users List

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-11-23 22:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-19  0:13 Function or Alias - Does it matter? TJ Luoma
2014-11-19  0:45 ` James Pearson
2014-11-19  2:51 ` Bart Schaefer
2014-11-19  8:59 ` Oliver Kiddle
2014-11-23 22:35 ` zzapper

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).