0

I am trying to source the script below, and I get this error:

bash: csh.cshrc: line 16: syntax error: unexpected end of file

I have not been able to find an answer, any help would be great, thanks.


/etc/csh.cshrc: system-wide .cshrc file for csh(1) and tcsh(1)

if ($?tcsh && $?prompt) then

    bindkey "\e[1~" beginning-of-line # Home
    bindkey "\e[7~" beginning-of-line # Home rxvt
    bindkey "\e[2~" overwrite-mode    # Ins
    bindkey "\e[3~" delete-char       # Delete
    bindkey "\e[4~" end-of-line       # End
    bindkey "\e[8~" end-of-line       # End rxvt

    set autoexpand
    set autolist
    set prompt = "%U%m%u:%B%~%b%# "
endif
3
  • If it were a bash script, it would require a semicolon before the then
    – gengisdave
    Sep 4, 2015 at 17:45
  • 1
    You are trying to use bash to execute a csh script. But csh scripts require a csh-compatible shell such as tcsh -- bash is not.
    – Ben Voigt
    Sep 4, 2015 at 17:58
  • 13 lines in your code snippet. line 16 in the error.
    – user559633
    Sep 4, 2015 at 19:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.