Skip to content

Unknown function when editing certain shell scripts #864

@nk53

Description

@nk53

Does this bug happen when you install plugin without vim-polyglot?
No.

Describe the bug:
Editing a csh file with no file extension gives the following error:

Error detected while processing BufReadPost Autocommands for "*"..function polyglot#shebang#Detect[7]..polyglot#shebang#VimDetect:
line    48:
E117: Unknown function: dist#ft#SetFileTypeShell

To Reproduce:

1: PlugInstall vim-polyglot with default settings.
2: Create a script like:

#!/bin/csh
echo Hello World

3: Save w/o file extension (ERROR: test, NO ERROR: test.csh, test.sh)
4: Open file in vim (I'm using neovim 0.10.3)

Possible Fix:

When I changed all references in vim-polyglot/autoload/polyglot/shebang.vim from dist#... to polyglot#... the error disappeared and ft was correctly set to csh.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions