I am exploring the use of WSL 2 for Windows 10, version 2004. My preferred shell is tcsh, which I've installed. I am now trying to set up my usual aliases by placing them in a file such as .tschrc that is read when I start the terminal program under Ubuntu. However, this approach is consistently failing. I have traced this back to problems "source-ing" a file with the "source" command.
For example, suppose .tcshrcSAV2 contains this line:
alias ll 'ls -l'
If I use the source command on this file like so:
source .tcshrcSAV2
I get an error and the alias does not work. The error after executing the source command is:
: Command not found.
The problem is not the source command. It is found and executed. If I do "which source", it is indeed the built-in shell command.
Some sort of alias is created, but it does not work. If I execute the command
ll
I get the following error:
's: invalid option -- '
Try 'ls --help' for more information.
If I list the aliases in my shell, it looks OK:
$> alias
ll ls -l
However, there is clearly something wrong with the alias. If instead I create the alias at the command line, and not through sourcing the file above, the alias works.
Is this a known problem with tcsh on WSL 2? Thanks!