Skip to content

Instantly share code, notes, and snippets.

@nickdotht
Last active September 9, 2016 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickdotht/dc13c12c5ad0760931d903ac86991add to your computer and use it in GitHub Desktop.
Save nickdotht/dc13c12c5ad0760931d903ac86991add to your computer and use it in GitHub Desktop.
#!/bin/sh
config=~/.zshrc
echo "" >> ${config}
echo "# Shortcuts provided by Nick Rameau (@r4meau | 42)" >> ${config}
echo "# Remove those two lines below if you're not using a 42 computer" >> ${config}
echo "alias gg=\"gcc -Wall -Wextra -Werror\"" >> ${config}
echo "alias nn=\"norminette -R CheckForbiddenSourceHeader\"" >> ${config}
echo "" >> ${config}
echo "alias ll=\"ls -l\"" >> ${config}
echo "alias la=\"ls -la\"" >> ${config}
echo "alias l=\"ls\"" >> ${config}
echo "alias gc=\"git clone\"" >> ${config}
echo "alias gp=\"git push origin master\"" >> ${config}
echo "alias gcm=\"git commit -m\"" >> ${config}
echo "alias gs=\"git status\"" >> ${config}
echo "alias ga=\"git add\"" >> ${config}
echo "alias md=\"mkdir\"" >> ${config}
echo "alias rd=\"rmdir\"" >> ${config}
echo "alias rf=\"rm -rf\"" >> ${config}
echo "alias cl=\"clear\"" >> ${config}
exec /bin/zsh
@nickdotht
Copy link
Author

nickdotht commented Aug 13, 2016

HEY THERE - PLEASE READ THIS

Here's what this does

This simply creates some shortcuts for you so you can be faster in the terminal and get your job done. You must have ZSH installed for it to work.

Instead of Typing Now you can type
norminette -R CheckForbiddenSourceHeader nn
gcc -Wall -Wextra -Werror gg
ls -l ll
ls -la la
ls l
git clone gc
git push origin master gp
git commit -m gcm
git status gs
git add ga
mkdir md
rmdir rd
rm -rf rf
clear cl

Here's how to use it

  • Copy THIS URL to your clipboard
  • Open your Terminal (iTerm2 or any other terminal emulator you use)
  • Enter curl -s PASTETHELINKHERE > shortcuts.sh in your terminal (of course put your link instead of PASTETHELINKHERE)
  • Enter sh shortcuts.sh in your terminal
  • Enjoy your shortcuts

Peace out ✌️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment