Write beautiful shell scripts with Gum! [Terminal Velocity 4]

  Рет қаралды 22,556

Andrew Burgess

Andrew Burgess

Күн бұрын

Пікірлер: 36
@charmcli
@charmcli 2 жыл бұрын
We're so flattered! Thanks for the awesome video on Gum
@vanshajdhar9223
@vanshajdhar9223 Жыл бұрын
8:05 Bash has support for arrays, rather than doing tr, you can use branches=($(git branch)) This will take branches as an array Then use for for branch in {branches[@]}; do echo "the branch is $branch"; done
@alessandroferrari2166
@alessandroferrari2166 2 жыл бұрын
it's such a pleasure seeing you going through your thinking process and coding things out
@darkarie
@darkarie Жыл бұрын
fyi you can use `gum filter --no-limit` and use the fuzzy finder too. Then you would use Tab instead of Space for the multi selection :)
@nickolaizein7465
@nickolaizein7465 11 ай бұрын
Nice! I think it would be helpfull in my next bash task! Thank you!
@davidh.4944
@davidh.4944 3 ай бұрын
Just a reminder, while it may not look as fancy, bash does have the built-in _select_ operator for simple menu choices. select branch in "${branches[@]}"; do echo "$branch" break done Other comments below detail how to get the input into an array. But you could also just use an unquoted $(git branch) in this case, and rely on IFS word splitting to break up the list.
@davidh.4944
@davidh.4944 3 ай бұрын
Also, any time you start to call up tr, think about using parameter substitution instead. Ignoring the array stuff for now: branches=$(git branch) echo "${branches// /$' '}" And to handle unset parameters, you can simply set a default value. limit=${1:-1}
@mmmikem
@mmmikem 2 жыл бұрын
Pleasantly surprised with this content!! Seriously cool and had never heard about this before!
@andrew-burgess
@andrew-burgess 2 жыл бұрын
Thanks! BTW, what do you think of the audio on this one? Made some changes to my mic setup and my post processing!
@mmmikem
@mmmikem 2 жыл бұрын
@@andrew-burgess it's super!! Could listen to this all day 👍🏻 On a slightly unrelated note, your pacing is really good too! I feel like you took just the right amount of time to explain what you were doing, that even though I haven't touched bash in 3 years, I was able to follow and learn a ton!
@andrew-burgess
@andrew-burgess 2 жыл бұрын
@@mmmikem That means a lot to me! Thanks so much, glad to have you watching :)
@i_do_stuff
@i_do_stuff 8 ай бұрын
very cool and useful
@blank001
@blank001 2 жыл бұрын
Gum's use case looks somewhat similar to that of dmenu and rofi, will definitely give this a try by updating some of my existing dmenu scripts to gum
@andrew-burgess
@andrew-burgess 2 жыл бұрын
That’s cool, I’ve only heard of dmenu and rofi in the context of Linux app launchers. Are you referring yo something else?
@blank001
@blank001 2 жыл бұрын
@@andrew-burgess you are in for a treat, dmenu and rofi has so many wide use cases other than just app launching. I'll add some examples here, when I am on my PC
@leo848
@leo848 Жыл бұрын
@@blank001 2 months ago...
@theycallmesloth
@theycallmesloth Жыл бұрын
@@leo848 it can work as app launcher, clipboard manager, emoji picker, network manager, logout manager, maybe more, But I use it for these only.
@DharmaJannyter
@DharmaJannyter Жыл бұрын
@@blank001You on that PC yet?... 😔
@moneyfr
@moneyfr 2 жыл бұрын
How do you to always make interesting topics video.
@vitormelo22
@vitormelo22 Жыл бұрын
This is amazing tool.
@digitaldisruptlabs
@digitaldisruptlabs 2 жыл бұрын
Great videos, I have looking for something to level up my scripts, and looks like this a very good and fun option. Btw, your keyboard sounds pretty good. What's the model? :) Cheers!
@andrew-burgess
@andrew-burgess 2 жыл бұрын
Thanks! I’m using the Drop ALT keyboard.
@alirezashayegan8260
@alirezashayegan8260 Жыл бұрын
its so good
@user-kn4wt
@user-kn4wt Жыл бұрын
what are the options for doing this in python? I've seen rich but it doesn't seem quite as powerful as this or bubbletea.
@kshitijnigam
@kshitijnigam Жыл бұрын
great, I am too dumb to ask how its predicting and giving suggestions in vim? any plugins?
@andrew-burgess
@andrew-burgess Жыл бұрын
Yep! Check out shaky.sh/tools/
@kshitijnigam
@kshitijnigam Жыл бұрын
@@andrew-burgess awesome I will check it out also , just for this prompt response , u got my sub :)
@techtude
@techtude Жыл бұрын
You look like Linus Torvalds in thumbnail Pleas don't fall in love that much with linux.. Lol
@mahdiaghaei8154
@mahdiaghaei8154 2 жыл бұрын
Awesome
@nicolasparada
@nicolasparada 2 жыл бұрын
Very nice
@mattcargile
@mattcargile 4 ай бұрын
Not a fan of how the echo data stays on screen.
@sluchaynayakotya1386
@sluchaynayakotya1386 Жыл бұрын
красивый мужик, знает баш и работает в виме, надо его срочно замуж выдавать. если он показал всё что делает гам то получается он умеет форматировать текст и создавать чекбоксы. ахуеть конечно функционал. за собой он наверное тащит ncurses а что же еще. честно говоря, если мне захочется пользоваться псевдографическим интерфейсом, я наверное сам руками его напишу потому что это весело, но гам тоже установлю, потому что мне тоже будет нужен ncurses. кто будет пользовааться гамом кроме самой чарм и тех кто его рекламирует? наверное никто, в этом наверное и смысл этих программ, это симулякры НО вот я например посомтрел это видео налюбовался на двойной подбородок этого красавицы мужчины и теперь мне тоже хочется начать писать на баш. баш вообще крутой язык, совершенно неинтуитивный, но некоторые решения там сделаны так как я бы сам сделал если бы изобретал собственный баш. лаконичный язык.
@samuelbanya
@samuelbanya 3 ай бұрын
Rewriting Magit huh? Just use Doom Emacs
@paulthexton7483
@paulthexton7483 Жыл бұрын
Great video. Gum does look really nice, I've done this sort of stuff before using the old ncurses based dialog command and it's pretty painful. However: "Bash doesn't really have great support for lists or arrays" ... not _entirely_ true, here's another way to skin that particular spud... #!/bin/bash get_branches() { echo "branch_one branch_two branch_three" } read -r -a branches
Painless prompt setup with Starship [Terminal Velocity 3]
7:01
Andrew Burgess
Рет қаралды 60 М.
Easier Shell Scripting with ZX (first look)
12:20
Andrew Burgess
Рет қаралды 8 М.
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 227 МЛН
СКОЛЬКО ПАЛЬЦЕВ ТУТ?
00:16
Masomka
Рет қаралды 3,5 МЛН
How To Create A "Proper" CLI With Shell And Charm Gum
14:45
DevOps Toolkit
Рет қаралды 12 М.
This is Why You NEED to Use This Golang CLI Framework
15:22
will i never understand this? unknown.
12:05
Andrew Burgess
Рет қаралды 3,9 М.
Solving the Dotfiles Problem (And Learning Bash)
8:22
Bartek Spitza
Рет қаралды 92 М.
Build better shell scripts with ShellCheck [Terminal Velocity 6]
9:06
Andrew Burgess
Рет қаралды 4,7 М.
Automate GIF Creation with Charm VHS
8:07
Charm CLI
Рет қаралды 8 М.
Building your own tools on the command line [Terminal Velocity 5]
8:57
Dotfiles! Here's how I organize them.
9:37
Andrew Burgess
Рет қаралды 47 М.
The Value of Source Code
17:46
Philomatics
Рет қаралды 202 М.