5 Terminal Aliases Every Developer Needs To Know!

5 Terminal Aliases Every Developer Needs To Know!

Travis Media

7 месяцев назад

3,910 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@voytechj
@voytechj - 16.11.2023 13:01

you forgot to mention that function accepts parameters. For silly example, printing first line from a file and changing each word to X:
h1() { head -1 "$1" | sed 's/\w/X/g' ; }

using:
h1 file1.txt
h1 file2.txt

there is a pipe inside a function and this is impossible to make it work with only aliases because they are only simple abbreviations and you can't inject something into an alias. Function let you put parameter at any position.

Ответить
@creekford483
@creekford483 - 11.11.2023 01:02

Can we setup password variables with allies

Ответить
@aidoka2000
@aidoka2000 - 03.11.2023 19:06

and then you forget all the original commands :)

Ответить
@the7odmelmoney
@the7odmelmoney - 02.11.2023 16:04

This is great

Ответить
@phatboislym
@phatboislym - 01.11.2023 20:03

it's recommended that you use a separate file for your aliases
instead of adding them to your user bashrc or zshrc file
then this file is sourced everytime you start a new session
for this reason default bashrcs usually have a block like this

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

/$user/.bash_aliases being the suggested file for aliases
you could then extend this with another file for functions

Ответить
@Jay-es9kz
@Jay-es9kz - 01.11.2023 18:58

Hey Travis! Love the video, gotta ask, what assistant was that in the beginning? Looks cool and helpful

Ответить
@nerminsky1039
@nerminsky1039 - 01.11.2023 17:38

Hi Travis, Would you kindly consider upgrading the course titled 'Bike Rental App'? Thenks

Ответить
@HavoJavo
@HavoJavo - 01.11.2023 16:39

Nice, tyvm

Ответить
@trainofthought5733
@trainofthought5733 - 01.11.2023 16:11

Mac 👀

Ответить