Whenever I start my bash terminal on Windows (git-bash) and I run alias
I get the following aliases:
$ alias
alias ll='ls -l'
alias ls='ls -F --color=auto --show-control-chars'
alias ltsc='$(npm bin)/tsc'
alias lwbc='$(npm bin)/webpack'
alias node='winpty node.exe'
In my .bashrc
I have only the following:
alias lwbc="\$(npm bin)/webpack"
alias ltsc="\$(npm bin)/tsc"
In my .bash_profile
I have the following:
test -f ~/.profile && . ~/.profile
test -f ~/.bashrc && . ~/.bashrc
I don't have .profile
file.
So where do these come from:
alias ll='ls -l'
alias ls='ls -F --color=auto --show-control-chars'
alias node='winpty node.exe'
Update:
I've found that these aliases come from /etc/profile.d/aliases.sh
, now how do I know where this file is triggered from?
which
is relevant here? – Max Koretskyi Feb 03 '17 at 18:35bash -lxv -c exit 2>&1 | grep alias
– Jeff Schaller Feb 03 '17 at 20:38aliases.sh
most likely has to be called by some other file so I do agrep -l aliases.sh /etc/*
then dogrep -l aliases.sh /etc/*/*
and so on till I hopefully track it down. worst case/etc/profile.d/aliases.sh
is hard coded in some binary or kernel in which case you would not find it. – ron Feb 05 '17 at 16:01