I'm trying to modify the ls command with an alias in my .bashrc file, and I'm getting some strange errors.
.bashrc file
export http_proxy="Some URL"
export https_proxy=$http_proxy
alias ls='ls --color'
Then, when I try ls
, the output is
's: unrecognized option '--color
Try 'ls --help' for more information.
If I remove the alias from my .bashrc and run ls --color
, I see the expected result.
I'm not sure what I'm doing wrong, but help would be appreciated. Each time I make a change, I do restart the terminal to ensure the .bashrc is reloaded. OS is Ubuntu 14.04.
Some things that might be relevant
- The empty line in my .bashrc causes
: command not found
to be displayed to the terminal when I open up a new one. - If I run
alias ls='ls --color'
in the terminal, the alias works correctly. - Technically, I am on Windows, using Cygwin to SSH onto this Ubuntu VM.
Related questions
why alias names defined in .bashrc file are not working?
http://www.linuxquestions.org/questions/linux-newbie-8/bashrc-aliases-don't-work-267885/
Alias not working in Debian
https://unix.stackexchange.com/questions/44616/why-is-vim-creating-files-with-dos-line-endings