zsh-users
 help / color / mirror / code / Atom feed
* When it is allowed to use alias after defining it?
@ 2022-12-30 21:45 Sebastian Gniazdowski
  2022-12-30 22:01 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Gniazdowski @ 2022-12-30 21:45 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

I was thinking that in current file it is impossible to use an alias – only
should work in sourced sub-script.

So:
alias q=pushd
# Expected to not work
q
# Expected to work
source ./using-q.zsh

The script is  fine to use q. Is that the truth? Because I'm using aliases
in the same file, only if it is at some proximity from definition. What are
the rules here?

-- 
Best regards,
Sebastian Gniazdowski

[-- Attachment #2: Type: text/html, Size: 1363 bytes --]

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

end of thread, other threads:[~2022-12-30 22:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-30 21:45 When it is allowed to use alias after defining it? Sebastian Gniazdowski
2022-12-30 22:01 ` Peter Stephenson

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).