Giter VIP home page Giter VIP logo

zshrc_aliases's Introduction

๐Ÿ“– 42 & GIT ZSHRC CHEATSHEET FOR BEGINNERS

Menu

Norm

Git

Make

Basic

Valgrind

Open Links/Folders

๐Ÿ“‹ How alias works:

user-defined shortcut for a command or set of commands you can invoke like any other command.

The basic syntax for defining an alias is as follows:

alias (name of the alias)='(the command/s you want to assign to the alias)' RTFM

๐Ÿ’ก ZSHRC Themes via:

If you want more than this have a look up on their 200+ plugins

A few example:

alias-finder

Which if the typed command is in an alias, it will show you. Get used to aliases esier

common-aliases

Link to the rest 200+ plguins

https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins

๐Ÿ› ๏ธ Aliases I use:

Norm

alias n='norminette'

Grep only the number of norm errors

alias n='n | grep Error: |  wc -l'

Grep only the error lines with their location

alias n='n | grep Error'

Git

Git clone the repo on my clipboard

c() {
	local copied_text
	copied_text=$(pbpaste)
	git clone $copied_text
}

Git add all and commit

alias ga='git add . && git commit -m'

Git diff

alias gd='git diff'

Git push

alias gp='git push'

Git status

alias gs='git status'

Git pull

alias p='git pull'

Add my libft as a git submodule (change it to yours..)

alias gsa='git submodule add https://github.com/zstenger93/libft.git'

Git commit history

alias gl='git log'

Git commit history short

alias glo='git log --oneline'

Git commit history with changes shown in the commits

alias gld='git log -p'

Git checkout

alias gco='git checkout'

Make

Make

alias m='make'

Make bonus

alias mb='make bonus'

Make clean

alias mc='make clean'

make fclean

alias mf='make fclean'

make re

alias mr='make re'

Open links or folders

Open my github profile (change it to yours..)

alias gh='open https://github.com/zstenger93'

Open my intra profile

alias i='open https://profile.intra.42.fr/'

If you need a directory a lot of times for some reason

alias (name of the alias)='open (path to folder)'

Basic

Type "tco filename" to create and open a c file, you can change it to whatever. I have it for .c .h and Makefile

tco() {
  touch "$1.c"
  open -a Visual\ Studio\ Code "$1.c"
}

Type "tc filename" to create a c file, same as the previous without opening it

tc() {
  touch "$1.c"
}

Touch

alias t='touch'

To edit my aliases:

alias z='vi ~/.zshrc'

chmod

alias ch='chmod +x'

Move back one folder

alias .='cd ..'

If you move to a specific directory many times you can try this: cd to root and the path to the dirctory

alias name='cd / && cd path/to/directory'

AFK - Screen Lock

alias a='pmset displaysleepnow'

Brew install

alias b='brew install'

Valgrind

Valgrind

alias v='valgrind'

Valgrind memcheck

alias vmem='valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-limit=no --tool=memcheck'

๐Ÿ”

zshrc_aliases's People

Contributors

zstenger93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.