Sorry, but I am a near-perfect noob for vim plug-ins AND a perfect one for github based installs.
I just installed _python-mode_ on _syntastic_ with _pathogen.vim_. Am now looking at installing _gcc_ and _shellcheck_.
1) Is there any way to install _shellcheck_ without resorting to _cabal_ ?
2) For debian based distros you mention:
$ sudo apt-get install shellcheck
But there is no mention of a repo or of subsequent configuration instruction for _~/.vimrc_ .
Further pointers needed, because I don't who to turn to. Thank you. -ced
If you have syntastic successfully installed in vim, and shellcheck installed on the system through apt-get, you shouldn't have to do anything else.
Have you checked that it doesn't just work when you edit a shell script?
@koalaman: Hi and thank you for taklng the trouble.
I did install syntastic but not shellcheck at all. How could I
install shellcheck using sudo apt-get install ... if I have no
debian package repository for it ?
I guess my question boils down to that...
I just don't get it. It is not a package supported by Canonical so it is
not in the Ubuntu Software Center and I don't have a repo for it.
What gives ? I am really missing something I think.
-ced
On 13/08/15 21:48, koalaman wrote:
If you have syntastic successfully installed in vim, and shellcheck
installed on the system through apt-get, you shouldn't have to do
anything else.Have you checked that it doesn't just work when you edit a shell script?
—
Reply to this email directly or view it on GitHub
https://github.com/koalaman/shellcheck/issues/439#issuecomment-130818818.
On Ubuntu it's in Universe, so you'd need that repo enabled: https://launchpad.net/ubuntu/+source/shellcheck
@koalaman, apparently what you give me is no repo, just a web site.
I went on looking for the universe repo for Ubuntu and other Debian based distros. I did:
$ sudo add-apt-repository \
"deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
$ echo $?
0
$ sudo apt-get update
Followed by:
$ sudo apt-get install shellcheck
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package shellcheck
So shellcheck is not in that repo. Will keep looking.
The page I linked to shows the versions currently in universe for Ubuntu Trusty, Vivid and Wily. Are you using one of these three Ubuntu versions?
Yes, I saw the three versions there. I use Trusty (14.04.3). I sort of intimate now that I should just copy a previously decompressed file somewhere on my box .... ( Is that so ?!).
Apparently my python-mode plugin was put upon install in ~/.vim/bundle, right next to syntastic.
Since shellcheck is "handled" by syntastic, should I put it in:
~/.vim/bundle/syntastic/plugin/ ?
or in ~/.vim/bundle/syntastic/autoload/ ?
or in ~/.vim/bundle/syntastic/plugin/syntastic ?
Could it be that there is no proper "install" the way it is commonly the case with built packages ?
Are plug-ins actually built at all ?
Thank you for your patience and ... again... sorry. I know those questions are probably ultra basic. I just am discovering all this. It's like Christmas everyday, but I have not learnt, just yet, how to open the presents ...
Using the link you provided, I saw two shellcheck tar-balls that could be what I am looking for:
- shellcheck_0.3.3.orig.tar.gz 69.5 KiB
- shellcheck_0.3.3-1~ubuntu14.04.1.debian.tar.xz 12.2 KiB
1) I have no idea which I should use. Perhaps you can help here.
2) I don't know in what directory I should extract them.
I provided a somewhat simplified (pruned) tree of ~/.vim/ so you can perhaps point at where extracted files should be placed. The tree is the result of a simple $ tree -L 4 in terminal.
Thank you.

I booted a Trusty iso and had a look. Ticking this box for backports:

along with this box for universe:

ended up adding
deb http://archive.ubuntu.com/ubuntu/ trusty-backports restricted main universe
and an apt-get update and apt-get install shellcheck then successfully installed shellcheck. A quite old version, but still.
Yes, it did it. Thanks a lot. First time I have backports enabled. I've experimented a bit and by the look of shellcheck at work in terminal, I notice that it does not flag a badly written shebang: E.g. #!/brin/wooser/ bash -xv.
You mentionned that the version 0.3.3 is old. If I forget about using Ubuntu's Universe backports, can I get my hands on a more recent version of shellcheck?
On a fresh Trusty installation I enabled universe and did
sudo apt-get install cabal-install
cabal update
cabal install shellcheck
and a few minutes later it had compiled and installed shellcheck 0.3.8 to $HOME/.cabal/bin (which can then be added to $PATH). This is the latest stable release.
Reopen if you're having further problems.
... for Ubuntu Trusty, Vivid and Wily. Are you using one of these three Ubuntu versions?
I think it is worth mentioning this in the Readme. It will help avoid needless efforts in troubleshooting installation in another version, say Precise? (I'm trying to setup shellcheck for a build on travis)
Please do add to the readme file that Ubuntu 'trusty' (which is currently an extremely-common long-term support distribution) will need the 'trusty-backports universe' package source in order to install shellcheck via apt-get. A great many trusty users will not have backports enabled.
Most helpful comment
On a fresh Trusty installation I enabled universe and did
and a few minutes later it had compiled and installed shellcheck 0.3.8 to
$HOME/.cabal/bin(which can then be added to$PATH). This is the latest stable release.