Fix Your Shell Scripts With Shellcheck

  Рет қаралды 13,850

DistroTube

DistroTube

Күн бұрын

Пікірлер: 63
@fu_gyokuryu
@fu_gyokuryu 3 жыл бұрын
Weird world we live in, i found this today use it, and love it, and here it is DT doing a video on it
@littlepeon
@littlepeon 3 жыл бұрын
was expecting your shell example to start with shebang: #!/usr/local/bin/fish But then i realized Shellcheck would respond with error message: warning! Fish is NOT a shell!
@drishalballaney6590
@drishalballaney6590 3 жыл бұрын
HAHA I am dying 🤣🤣
@daringcuteseal
@daringcuteseal 3 жыл бұрын
loll
@alexkeenan2575
@alexkeenan2575 3 жыл бұрын
not sure if anyone gives a shit but if you are stoned like me during the covid times then you can watch pretty much all the new series on InstaFlixxer. Have been binge watching with my girlfriend for the last days =)
@jaceisaac7379
@jaceisaac7379 3 жыл бұрын
@Alex Keenan Definitely, I have been using instaflixxer for since november myself =)
@RickRomig
@RickRomig 3 жыл бұрын
I've been using shellcheck for at least a couple of years. I've set up aliases with the options and exclusions I use. A very handy utility.
@daxterstrock3319
@daxterstrock3319 3 жыл бұрын
Actually really excited too use this as I’m learning to write my own bash scripts and such
@martiniliev3021
@martiniliev3021 3 жыл бұрын
Thank you for this great utility, after checking with some scripts, I am impressed :)
@kda_-uh3vj
@kda_-uh3vj 3 жыл бұрын
Amazing! I didn't know this existed
@Gadgetoholic
@Gadgetoholic Жыл бұрын
Really helpful. Thanks man!
@AndersJackson
@AndersJackson 3 жыл бұрын
The XML format is great for interpreting the errors in automatic testing software. Like CodeGrade or something like that.
@zedth2
@zedth2 3 жыл бұрын
or integrating it into some sort of text editor IDE
@AtomToast
@AtomToast 3 жыл бұрын
you can also set up shellcheck with a diagnostics language server in order to get live linting right in your editor
@swindlesmccoop
@swindlesmccoop 2 жыл бұрын
do you know how i could set that up with vim?
@henninb
@henninb 3 жыл бұрын
This is one of my favorite tools
@rajughorai3909
@rajughorai3909 3 жыл бұрын
gone use next time i write shell code
@jm1981
@jm1981 3 жыл бұрын
Awesome stuff.
@sasharenee252
@sasharenee252 3 жыл бұрын
seems cool!
@edupazz
@edupazz 3 жыл бұрын
Great content, DT! Unfortunately, a downside of this application is it requires a ton of haskell dependencies (32, according to paru)
@DistroTube
@DistroTube 3 жыл бұрын
If you have XMonad and Pandoc installed anyway (and you really should), then it isn't a problem. ;)
@edupazz
@edupazz 3 жыл бұрын
@@DistroTube it's no my case, indeed
@BrucesWorldofStuff
@BrucesWorldofStuff 3 жыл бұрын
@@DistroTube HaHaHa I get 27 updates a day and 24 of them are Haskell updates and the sad thing. I don't remember why I have Haskell installed... LOL LLAP
@AndersJackson
@AndersJackson 3 жыл бұрын
@@BrucesWorldofStuff because you use Xmonad, of course. 😜
@BrucesWorldofStuff
@BrucesWorldofStuff 3 жыл бұрын
​@@AndersJackson LOL... That's the thing! I don't use Xmonad... ROTF I do use Leftwm and Spectrwm.... (Ding) Wait! Wait! Got it! Leftwm had me install Xmobar, Lemonbar, and Polybar. But I never Xmobar or Lemonbar. I used Polybar instead... LMAO... I bet that's it... LLAP
@MarcelRobitaille
@MarcelRobitaille 3 жыл бұрын
If you walk so much about how much more efficient window managers / keyboard-driven everything is you may want to leave insert mode from time to time (your rice is pretty nice though. Love the green status line).
@SpencerA99
@SpencerA99 3 жыл бұрын
checkbashisms is another good one. Also has a posix flag. Written by debian I believe
@guilherme5094
@guilherme5094 3 жыл бұрын
Nice!
@YannMetalhead
@YannMetalhead Жыл бұрын
Good video.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 3 жыл бұрын
2:38 Perfectly valid code so far.
@tusharkuntawar6170
@tusharkuntawar6170 3 жыл бұрын
Hey DT, do you know any stuff that makes navigation faster in vim without plugins
@Neucher
@Neucher 3 жыл бұрын
DT, what will be the requirement for DT OS install script? Will it work on a fresh arch ?
@007arek
@007arek 3 жыл бұрын
What is the best alternative to bash except python? I'm looking something for writing scripts.
@mantamizhan4305
@mantamizhan4305 3 жыл бұрын
I would like know have you made terminal no-header ?
@tazz7390
@tazz7390 3 жыл бұрын
Hey, DT, I have a question. How do you get menus for shutdown, restart and logout on window managers? I was using rofi before, but i3 doesn't seem to play well with rofi. Any suggestions?
@tic-tech-toe5394
@tic-tech-toe5394 3 жыл бұрын
you can use i3 menu to create custom menu for your likings. i am on i3 and i use that for shutdown and other custom shortcuts
@twb0109
@twb0109 3 жыл бұрын
Use i3 menus, they're like emacs keychords. Or write a shell script that outputs to rofi/dmenu, plenty of tutorials out there.
@tazz7390
@tazz7390 3 жыл бұрын
Thanks guys, I'll try that out!
@twb0109
@twb0109 3 жыл бұрын
@@tazz7390 you're welcome
@ricknaam5658
@ricknaam5658 3 жыл бұрын
I never knew this worked in emacs (just install flycheck and shellcheck, no config needed), Ive been copy/pasting into the website this whole time..
@AndersJackson
@AndersJackson 3 жыл бұрын
Hm, have to check that out.
@aniakotowicz1976
@aniakotowicz1976 3 жыл бұрын
What are your thoughts on powershell core? 🤔
@armynyus9123
@armynyus9123 3 жыл бұрын
I have that rather directly in the editor: bash-language-server
@lorenzocabrini
@lorenzocabrini 3 жыл бұрын
I tried LSP mode and must say I was less than satisfied. I much prefer to run a linter after a CTRL-x s, rather than having Emacs doing weird stuff while I'm writing code.
@armynyus9123
@armynyus9123 3 жыл бұрын
@@lorenzocabrini I hereby admit kind of ashamed, that for coding I'm still on vim => did not try LSP in emacs. But yes, linting only on save.
@lorenzocabrini
@lorenzocabrini 3 жыл бұрын
@@armynyus9123 No need to feel ashamed. Nothing wrong about vim. It's a very capable editor. You could have done a lot worse, like some javascript-based freakshow. Sometimes it may sound like I criticize vim, but I really don't. what gets me is this very vocal minority of vim "users" who, instead of being happy with their own editor, go onto videos about Emacs and demand that Emacs should be like vim. I for one celebrate the fact that we have two very capable editors to choose from, that way I can have it my way and you can have it your way. I used a vi-clone called elvis for many years, so I'm quite familiar with vi keybindings. It's just that I personally prefer the Emacs ones, not because I think they are superior but merely because I'm really used to them for my everyday tasks.
@phyzix_phyzix
@phyzix_phyzix 3 жыл бұрын
I was telling someone about this today. Nice coincidence
@lawrencedoliveiro9104
@lawrencedoliveiro9104 3 жыл бұрын
5:06 Not necessarily an error; it might be what you want.
@auronkardek
@auronkardek 3 жыл бұрын
I gonna disable this double quote error really fast
@lawrencedoliveiro9104
@lawrencedoliveiro9104 3 жыл бұрын
3:38 Obvious problem at this point is the missing shebang line.
3 жыл бұрын
Hey DT! I made a comment which made reference to a shell script I wrote which is called "bench.sh" and that comment is gone. Did it go to spam, or did you actually delete it? I did not write anything which would warrant deletion --- however warrant or not, its ultimately you who decides what types of comments you want. At any rate, I have always been decent AFAIK so I'm perplexed as to why it was deleted. Greetings from Scandinavia! Have a fantastic day.
@DistroTube
@DistroTube 3 жыл бұрын
Many comments get caught up in KZbin's spam algorithms. I don't see a comment from you in "Held for review". KZbin might have just deleted it entirely. Not much I or anyone else can do about this. It's just KZbin being KZbin.
3 жыл бұрын
​@@DistroTube I wrote a fairly long reply to yours just now and that too was deleted or "lost", unfortunately I had not copied and pasted the text into a texteditor as I normally do as a "security measure" or as a time saving effort when writing longer replies -- because the browser could crash and there goes the reply. So I have found myself automatically writing most of my comments in a texteditor simply to save myself time. But of course that does not rectify/fix anything when it comes to how YT handles comments -- its kind of just for my own sanity or peace of mind, because a guy's time is valuable as you probably already know very werll. At any rate, keep up the great content. I enjoy it all. 🙂
@lawrencedoliveiro9104
@lawrencedoliveiro9104 3 жыл бұрын
2:44 No such variable -- only error I can see so far.
@lakromani8172
@lakromani8172 2 жыл бұрын
Why does not shellcheck complain about the $sayHello? Line should be echo "$sayHello $myName"
Using Htop To Monitor Your System
11:41
DistroTube
Рет қаралды 17 М.
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 13 МЛН
New model rc bird unboxing and testing
00:10
Ruhul Shorts
Рет қаралды 25 МЛН
Gym belt !! 😂😂  @kauermtt
00:10
Tibo InShape
Рет қаралды 16 МЛН
A teacher captured the cutest moment at the nursery #shorts
00:33
Fabiosa Stories
Рет қаралды 14 МЛН
Rust Programs Every Linux User Should Know About
13:18
DistroTube
Рет қаралды 134 М.
Transform Your Scripts With Bash Simple Curses
16:15
DistroTube
Рет қаралды 107 М.
Want A List Of Your Keybindings? Write A Shell Script!
27:11
DistroTube
Рет қаралды 24 М.
How To Use The Shell Commands 'pushd', 'popd' and 'dirs'
13:45
DistroTube
Рет қаралды 16 М.
Two Powerful Command Line Utilities 'cut' And 'tr'
15:18
DistroTube
Рет қаралды 32 М.
So... why did AI take off now?
4:01
HGModernism
Рет қаралды 212
Search For Patterns Within Files With Grep
12:42
DistroTube
Рет қаралды 27 М.
Solve Problems With Shell Scripting And Dmenu
18:26
DistroTube
Рет қаралды 32 М.
НЕ БЕРУ APPLE VISION PRO!
0:37
ТЕСЛЕР
Рет қаралды 296 М.
iPhone socket cleaning #Fixit
0:30
Tamar DB (mt)
Рет қаралды 16 МЛН
Rate This Smartphone Cooler Set-up ⭐
0:10
Shakeuptech
Рет қаралды 3,8 МЛН
Лазер против камеры смартфона
1:01
NEWTONLABS
Рет қаралды 700 М.
Смартфон УЛУЧШАЕТ ЗРЕНИЕ!?
0:41
ÉЖИ АКСЁНОВ
Рет қаралды 1,2 МЛН
Looks very comfortable. #leddisplay #ledscreen #ledwall #eagerled
0:19
LED Screen Factory-EagerLED
Рет қаралды 2,4 МЛН