linux 命令jrep,Linux / Unix desktop fun: gti get jeep/car when you mistype git

O ne of the most common mistakes developers and ops people make is typing gti instead of git command. I set an alias i.e. alias gti=git, but then you may miss out on the jeep/car on your screen.

Install gti software to get jeep/car

gti is nothing but humorous typo-based git runner. It drives a car over the terminal. Type the followingapt command/apt-get command on a Debian / Ubuntu Linux after enabling gti viaadd-apt-repository

sudo add-apt-repository ppa:mamantoha/gti

sudo apt-get update

sudo apt-get install gti

Fedora Linux user type the following dnf command:

sudo dnf install gti

Execute the following brew command on a macOS Unix desktop:

brew install gti

Run the following pkg_add command command on a OpenBSD:

doas pkg_add -v gti

FreeBSD user type the following pkg command:

sudo pkg_add -v gti

Arch Linux user try the pacman command:

sudo pacman -S gti-git

A note about source code installation

Type the following commands, but install C compilers if not installed on your Linux system:

Next, Grab source code using the git command

$ git clone https://github.com/rwos/gti.git

$ cd gti

$ make

$ sudo make install

f06cb4a0f2f32cb8a0205904e16bfd5d.png

Compile and install a silly git launcher, basically. Inspired by sl.

Usage

I just mistypes git command as gti:

$ gti command

$ gti clone https://github.com/nixcraft/domain-check-2.git

7b0a4e279e7769eed62430b296835a17.gif

As you might have guessed by now, gti is intended to catch accidental typos of ‘gti’ instead of ‘git’. It displays an animation of a car driving by and then launches git. Any parameters or arguments given to gti will be passed through to the actual git binary. The car image is derived from the look of an old VW Golf GTI.

Linux/Unix environment variables supported by gti

Set GIT so that gti command respects the $GIT environment variable. If GIT is set, its value will be used to launch git after the animation finishes, instead of searching for git in your PATH:

export GIT=/opt/bin/git

gti clone foo

Want to control the speed of the gti command animation? Set GTI_SPEED (the default is 1000):

GTI_SPEED=2000 gti push ..

GTI_SPEED=2000 gti pull ..

GTI_SPEED=4000 gti clone ..

Conclusion

And there you have it, gti a silly git launcher, basically inspired by sl command that displays train . However, gti displays animations (jeep or car in the shell) aimed to correct users who accidentally enter gti instead of git for fun and profit. If you enjoyed this desktop fun app, you might also like to use the following apps on Linux:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值