Re: Jessie - Strange Alias Problem
Hi, Stephen P. Molnar wrote: > None of the alias's work. That would be the effect of unalias -a or of a subshell which exits before you try to execute "l" again $ ( alias xyz='echo xyz' ; alias xyz ) ; alias xyz alias xyz='echo xyz' bash: alias: xyz: not found Have a nice day :) Thomas
Re: Jessie - Strange Alias Problem
On Mon, Oct 17, 2016 at 03:32:20PM -0400, Stephen P. Molnar wrote: > None of the alias's work. Please show us what you're doing. What commands are you running in between the point where the alias works, and the point where it does not work? What happens when you run "l" after the latter point?
RE: Jessie - Strange Alias Problem
-Original Message- From: Thomas Schmitt [mailto:scdbac...@gmx.net] Sent: Monday, October 17, 2016 3:18 PM To: debian-user@lists.debian.org Subject: Re: Jessie - Strange Alias Problem Hi, S. P. Molnar wrote: > comp@AbNormal:~$ trap > ... > comp@AbNormal:~$ echo "$PROMPT_COMMAND" These do not look like they could be the culprit. > comp@AbNormal:~$ alias > alias adt='/home/comp/Apps/MGLTools-latest/bin/adt' > alias l='ls -l --color' > alias ls='ls --color=auto' > alias mopac='/opt/mopac/MOPAC2016.exe' What do you get later, when "l" is not available as alias any more ? Do the others persist or are all gone ? Have a nice day :) Thomas None of the alias's work.
Re: Jessie - Strange Alias Problem
Hi, S. P. Molnar wrote: > comp@AbNormal:~$ trap > ... > comp@AbNormal:~$ echo "$PROMPT_COMMAND" These do not look like they could be the culprit. > comp@AbNormal:~$ alias > alias adt='/home/comp/Apps/MGLTools-latest/bin/adt' > alias l='ls -l --color' > alias ls='ls --color=auto' > alias mopac='/opt/mopac/MOPAC2016.exe' What do you get later, when "l" is not available as alias any more ? Do the others persist or are all gone ? Have a nice day :) Thomas
Re: Jessie - Strange Alias Problem
On 10/17/2016 01:41 PM, Thomas Schmitt wrote: Hi, S. P. Molnar wrote: -bash: alias: l: not found The command which makes this reproducible for me is unalias l Greg Wooledge wrote: [...] DEBUG trap [...] PROMPT_COMMAND [...] [...] alias or function overriding the cd command. So many interesting ways to shoot the own foot. @S. P. Molnar: What do you get from these commands trap echo "$PROMPT_COMMAND" alias Have a nice day :) Thomas comp@AbNormal:~$ l -bash: l: command not found comp@AbNormal:~$ trap trap -- '' SIGTSTP trap -- '' SIGTTIN trap -- '' SIGTTOU comp@AbNormal:~$ echo "$PROMPT_COMMAND" comp@AbNormal:~$ alias comp@AbNormal:~$ source .bashrc comp@AbNormal:~$ trap trap -- '' SIGTSTP trap -- '' SIGTTIN trap -- '' SIGTTOU comp@AbNormal:~$ echo "$PROMPT_COMMAND" comp@AbNormal:~$ alias alias adt='/home/comp/Apps/MGLTools-latest/bin/adt' alias l='ls -l --color' alias ls='ls --color=auto' alias mopac='/opt/mopac/MOPAC2016.exe' comp@AbNormal:~$ -- Stephen P. Molnar, Ph.D.Life is a fuzzy set www.Molecular-Modeling.net Stochastic and multivariate (614)312-7528 (c) Skype: smolnar1
Re: Jessie - Strange Alias Problem
Hi, S. P. Molnar wrote: > > -bash: alias: l: not found The command which makes this reproducible for me is unalias l Greg Wooledge wrote: > [...] DEBUG trap [...] PROMPT_COMMAND [...] > [...] alias or function overriding the cd command. So many interesting ways to shoot the own foot. @S. P. Molnar: What do you get from these commands trap echo "$PROMPT_COMMAND" alias Have a nice day :) Thomas
Re: Jessie - Strange Alias Problem
On Mon, Oct 17, 2016 at 12:53:41PM -0400, S. P. Molnar wrote: > comp@AbNormal:~$ alias l > -bash: alias: l: not found Use "type l" immediately after sourcing the .bashrc file. Then do it again, then do your cd, then do it a third time. If the .bashrc is simply malformed, then the alias ought not to work even the first time. But you reported that it does work once. If the alias is set immediately after "source", but then goes away immediately, then you're probably clobbering it in a DEBUG trap, or in a PROMPT_COMMAND. If the alias persists after the first type command, but goes away when you cd, then you've probably got an alias or function overriding the cd command.
Re: Jessie - Strange Alias Problem
On 10/17/2016 12:55 PM, Thomas Schmitt wrote: Hi, i wrote: What exactly do you mean by "[to] source" ? Stephen P. Molnar wrote: source /home/comp/.bashrc I had already tested with . ~/.bashrc Now re-tried with source ~/.bashrc and the same result. I get colors if there are color-worthy files. When it does not work for you, what do you get from this: alias l Have a nice day :) Thomas comp@AbNormal:~$ alias l -bash: alias: l: not found -- Stephen P. Molnar, Ph.D.Life is a fuzzy set www.Molecular-Modeling.net Stochastic and multivariate (614)312-7528 (c) Skype: smolnar1
Re: Jessie - Strange Alias Problem
Hi, i wrote: > > What exactly do you mean by "[to] source" ? Stephen P. Molnar wrote: > source /home/comp/.bashrc I had already tested with . ~/.bashrc Now re-tried with source ~/.bashrc and the same result. I get colors if there are color-worthy files. When it does not work for you, what do you get from this: alias l Have a nice day :) Thomas
RE: Jessie - Strange Alias Problem
-Original Message- From: Thomas Schmitt [mailto:scdbac...@gmx.net] Sent: Monday, October 17, 2016 12:27 PM To: debian-user@lists.debian.org Subject: Re: Jessie - Strange Alias Problem Hi, S. P. Molnar wrote: > I have the following line in my /home/comp/.bashrc; alias l='ls -l > --color' > If I source the file in my /home/comp it works - once!, and only in my > home directory!!! What exactly do you mean by "[to] source" ? > If I change to another directory - it doesn't work! I can reproduce this only if the other directory contains nothing but data files which do not get a fancy color. (I put the alias into ~/.bashrc and start a new xterm to get it into effect.) Have a nice day :) Thomas source /home/comp/.bashrc
Re: Jessie - Strange Alias Problem
Hi, S. P. Molnar wrote: > I have the following line in my /home/comp/.bashrc; > alias l='ls -l --color' > If I source the file in my /home/comp it works - once!, and only in my home > directory!!! What exactly do you mean by "[to] source" ? > If I change to another directory - it doesn't work! I can reproduce this only if the other directory contains nothing but data files which do not get a fancy color. (I put the alias into ~/.bashrc and start a new xterm to get it into effect.) Have a nice day :) Thomas
Re: Jessie - Strange Alias Problem
On Mon, Oct 17, 2016 at 10:34:11AM -0400, S. P. Molnar wrote: > I have the following line in my /home/comp/.bashrc; > > alias l='ls -l --color' > > If I source the file in my /home/comp it works - once!, and only in my > home directory!!! If I change to another directory - it doesn't work! Use the command "type l" before and after changing directory, to be sure your alias is still set the way you expect. It's possible that you've overridden the "cd" command in such a way that it removes or changes your aliases (although that would be a pretty unusual thing to do).