dense-analysis / dense-analysis/ale
Setting "shellcmdflag" in .vimrc breaks ALE
- Dominant language
- Vim Script
- Stars
- 14k
- Forks
- 1.5k
- Avg merge
- 17h 49m
- Merged PRs (30d)
- 1
Description
## Information
**VIM version**
```
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Feb 19 2021 17:22:25)
macOS version
Included patches: 1-2164
Compiled by Homebrew
```
Operating System: macOS Big Sur 11.2.2
## What went wrong
I added to my .vimrc:
```
" let me use bash aliases from within Vim
" (https://stackoverflow.com/questions/4642822/how-to-make-bashrc-aliases-available-within-a-vim-shell-command)
set shellcmdflag=-ic
```
and now when I am in Vim, I see messages like this at the bottom of my screen:
```
Error detected while processing function 57_VimCloseCallback[22]..function 57_VimCloseC
allback[15]..4[1]..55_ExitCallback[28]..54_HandleExit[24]..ale_linters#markdown
#mdl#Handle[3]..ale#util#FuzzyJSONDecode:
line 8:
E491: json decode error at ']1337;RemoteHost=atsalolikhin@MB015-ATsalolikhin.local^G^[]1337;Curre
ntDir=/Users/atsalolikhin/git/work-log^G^[]1337;ShellIntegrationVersion=15;shell=bash^G[{"filenam
e":"(stdin)","line":3,"rule":"MD009","aliases":["no-trailing-spaces"],"description":"Trailing spa
ces"}]'
```
The error flashes briefly (for like a second) at the bottom of my screen, when I make changes to the file, or every once in a while. It's in red so it's very distracting.
If I remove the `shellcmdflag` setting, the error doesn't flash.
## Reproducing the bug
1. I added `set shellcmdflag=-ic` to my .vimrc
2. The error started appearing in Vim
### :ALEInfo
```
Current Filetype:
Available Linters: []
Enabled Linters: []
Ignored Linters: []
Suggested Fixers:
'remove_trailing_lines' - Remove all blank lines at the end of a file.
'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
Linter Variables:
Global Variables:
let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = v:null
let g:ale_command_wrapper = v:null
let g:ale_completion_delay = v:null
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = v:null
let g:ale_disable_lsp = 0
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = v:null
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = v:null
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_insert_leave = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'normal'
let g:ale_linter_aliases = {}
let g:ale_linters = {'markdown': ['mdl']}
let g:ale_linters_explicit = 0
let g:ale_linters_ignore = {}
let g:ale_list_vertical = v:null
let g:ale_list_window_size = v:null
let g:ale_loclist_msg_format = v:null
let g:ale_lsp_root = {}
let g:ale_max_buffer_history_size = v:null
let g:ale_max_signs = v:null
let g:ale_maximum_file_size = v:null
let g:ale_open_list = v:null
let g:ale_pattern_options = v:null
let g:ale_pattern_options_enabled = v:null
let g:ale_set_balloons = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = v:null
let g:ale_sign_error = v:null
let g:ale_sign_info = v:null
let g:ale_sign_offset = v:null
let g:ale_sign_style_error = v:null
let g:ale_sign_style_warning = v:null
let g:ale_sign_warning = v:null
let g:ale_sign_highlight_linenrs = v:null
let g:ale_statusline_format = v:null
let g:ale_type_map = v:null
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 0
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
Command History:
```
Contributor guide
Assessment
This issue has not been assessed yet.