zsh-users
 help / color / mirror / code / Atom feed
* Permission denied - putting an aliases.zsh file and it being called from .zshrc
@ 2016-12-23 21:42 shirish शिरीष
  2016-12-23 21:47 ` shirish शिरीष
  0 siblings, 1 reply; 4+ messages in thread
From: shirish शिरीष @ 2016-12-23 21:42 UTC (permalink / raw)
  To: zsh-users

Hi all,

Please CC while answering, newbie here.

IIUC, aliases are nothing but shortcuts.

For e.g. cls=clear and so on and so forth.

Now I have made a file called aliases.zsh  and want those aliases to
be used/called by .zshrc so I can use it within my zsh installation.

Then I tried -

 $ head .zshrc
~/.zsh/aliases.zsh

# Lines configured by zsh-newuser-install

HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=10000
setopt appendhistory autocd extendedglob nomatch notify
bindkey -e
# End of lines configured by zsh-newuser-install

Trying to source it though get permission denied messages -

/home/shirish/.zsh $ source .zshrc
.zshrc:1: permission denied: /home/shirish/.zsh/aliases.zsh

Why am I get permission denied messages ?

-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
EB80 462B 08E1 A0DE A73A  2C2F 9F3D C7A4 E1C4 D2D8


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

* Re: Permission denied - putting an aliases.zsh file and it being called from .zshrc
  2016-12-23 21:42 Permission denied - putting an aliases.zsh file and it being called from .zshrc shirish शिरीष
@ 2016-12-23 21:47 ` shirish शिरीष
  2016-12-23 22:56   ` Martijn Dekker
  0 siblings, 1 reply; 4+ messages in thread
From: shirish शिरीष @ 2016-12-23 21:47 UTC (permalink / raw)
  To: zsh-users

at bottom :-

On 24/12/2016, shirish शिरीष <shirishag75@gmail.com> wrote:
> Hi all,
>
> Please CC while answering, newbie here.
>
> IIUC, aliases are nothing but shortcuts.
>
> For e.g. cls=clear and so on and so forth.
>
> Now I have made a file called aliases.zsh  and want those aliases to
> be used/called by .zshrc so I can use it within my zsh installation.
>
> Then I tried -
>
>  $ head .zshrc
> ~/.zsh/aliases.zsh
>
> # Lines configured by zsh-newuser-install
>
> HISTFILE=~/.histfile
> HISTSIZE=10000
> SAVEHIST=10000
> setopt appendhistory autocd extendedglob nomatch notify
> bindkey -e
> # End of lines configured by zsh-newuser-install
>
> Trying to source it though get permission denied messages -
>
> /home/shirish/.zsh $ source .zshrc
> .zshrc:1: permission denied: /home/shirish/.zsh/aliases.zsh
>
> Why am I get permission denied messages ?
>

had forgotten to add executable right, now it all works, sorry folks... again.

-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
EB80 462B 08E1 A0DE A73A  2C2F 9F3D C7A4 E1C4 D2D8


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

* Re: Permission denied - putting an aliases.zsh file and it being called from .zshrc
  2016-12-23 21:47 ` shirish शिरीष
@ 2016-12-23 22:56   ` Martijn Dekker
  2016-12-24  1:24     ` shirish शिरीष
  0 siblings, 1 reply; 4+ messages in thread
From: Martijn Dekker @ 2016-12-23 22:56 UTC (permalink / raw)
  To: zsh-users; +Cc: shirish शिरीष

Op 23-12-16 om 21:47 schreef shirish शिरीष:
> at bottom :-
> 
> On 24/12/2016, shirish शिरीष <shirishag75@gmail.com> wrote:
[...]
>> Trying to source it though get permission denied messages -
>>
>> /home/shirish/.zsh $ source .zshrc
>> .zshrc:1: permission denied: /home/shirish/.zsh/aliases.zsh
>>
>> Why am I get permission denied messages ?
>>
> 
> had forgotten to add executable right, now it all works, sorry folks... again.

Actually, 'source' and '.' do not require the file to have executable
permission. The problem is that you were executing the file instead of
sourcing it (which would have caused the aliases to be promptly
forgotten after executing). The line you want in ~/.zshrc is:

source ~/.zsh/aliases.zsh

- M.


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

* Re: Permission denied - putting an aliases.zsh file and it being called from .zshrc
  2016-12-23 22:56   ` Martijn Dekker
@ 2016-12-24  1:24     ` shirish शिरीष
  0 siblings, 0 replies; 4+ messages in thread
From: shirish शिरीष @ 2016-12-24  1:24 UTC (permalink / raw)
  To: Martijn Dekker; +Cc: zsh-users

at bottom :-

On 24/12/2016, Martijn Dekker <martijn@inlv.org> wrote:
> Op 23-12-16 om 21:47 schreef shirish शिरीष:
>> at bottom :-
>>
>> On 24/12/2016, shirish शिरीष <shirishag75@gmail.com> wrote:
> [...]
>>> Trying to source it though get permission denied messages -
>>>
>>> /home/shirish/.zsh $ source .zshrc
>>> .zshrc:1: permission denied: /home/shirish/.zsh/aliases.zsh
>>>
>>> Why am I get permission denied messages ?
>>>
>>
>> had forgotten to add executable right, now it all works, sorry folks...
>> again.
>
> Actually, 'source' and '.' do not require the file to have executable
> permission. The problem is that you were executing the file instead of
> sourcing it (which would have caused the aliases to be promptly
> forgotten after executing). The line you want in ~/.zshrc is:
>
> source ~/.zsh/aliases.zsh
>
> - M.
>
>

That is what I did -

/home/shirish/.zsh  $ cat .zshrc | grep source
source ~/.zsh/aliases.zsh

I thought it needed to have executable rights as well, but you are
right, they work well without executable rights.

-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
EB80 462B 08E1 A0DE A73A  2C2F 9F3D C7A4 E1C4 D2D8


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

end of thread, other threads:[~2016-12-24  1:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-23 21:42 Permission denied - putting an aliases.zsh file and it being called from .zshrc shirish शिरीष
2016-12-23 21:47 ` shirish शिरीष
2016-12-23 22:56   ` Martijn Dekker
2016-12-24  1:24     ` shirish शिरीष

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