mirror of
https://github.com/Snigdha-OS/documentation.git
synced 2025-09-06 19:15:12 +02:00
1 line
28 KiB
JavaScript
1 line
28 KiB
JavaScript
"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[281],{8127:(n,s,e)=>{e.r(s),e.d(s,{assets:()=>t,contentTitle:()=>d,default:()=>x,frontMatter:()=>l,metadata:()=>i,toc:()=>o});const i=JSON.parse('{"id":"user-guide/snigdha-os-command-shorcuts","title":"Shortcut for Developers","description":"Git Commands & Aliases","source":"@site/docs/user-guide/snigdha-os-command-shorcuts.md","sourceDirName":"user-guide","slug":"/user-guide/snigdha-os-command-shorcuts","permalink":"/documentation/user-guide/snigdha-os-command-shorcuts","draft":false,"unlisted":false,"editUrl":"https://github.com/Snigdha-OS/documentation/tree/master/docs/user-guide/snigdha-os-command-shorcuts.md","tags":[],"version":"current","lastUpdatedAt":1735540368000,"sidebarPosition":2,"frontMatter":{"sidebar_position":2},"sidebar":"tutorialSidebar","previous":{"title":"Introduction to Terminal","permalink":"/documentation/user-guide/snigdha-os-terminal-shortcuts"},"next":{"title":"Installing with AUR","permalink":"/documentation/user-guide/snigdha-os-and-aur"}}');var r=e(6070),c=e(6599);const l={sidebar_position:2},d="Shortcut for Developers",t={},o=[{value:"Git Commands & Aliases",id:"git-commands--aliases",level:3},{value:"npm Aliases",id:"npm-aliases",level:3},{value:"pnpm Aliases",id:"pnpm-aliases",level:3},{value:"Python Aliases",id:"python-aliases",level:3},{value:"C++ Aliases",id:"c-aliases",level:3},{value:"C Aliases",id:"c-aliases-1",level:3},{value:"Rust Aliases",id:"rust-aliases",level:3}];function h(n){const s={br:"br",code:"code",h1:"h1",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,c.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"shortcut-for-developers",children:"Shortcut for Developers"})}),"\n",(0,r.jsx)(s.h3,{id:"git-commands--aliases",children:"Git Commands & Aliases"}),"\n",(0,r.jsx)(s.p,{children:"Here are your Git aliases with explanations and emojis for easy reference:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gs="git status"'})})," \ud83d\udcdc:",(0,r.jsx)(s.br,{}),"\n","Show the current status of the Git repository (modified files, untracked files, etc.)."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias ga="git add"'})})," \u2795:",(0,r.jsx)(s.br,{}),"\n","Stage changes for commit (adds a file to the staging area)."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gaa="git add --all"'})})," \ud83d\udce5:",(0,r.jsx)(s.br,{}),"\n","Stage all modified, deleted, and untracked files for commit."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gc="git commit"'})})," \u270f\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Commit the staged changes to the repository."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gca="git commit --amend"'})})," \ud83d\udd04\u270f\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Amend the last commit (useful for correcting commit messages or adding more changes)."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gcm="git commit -m"'})})," \ud83d\udcdd\ud83d\udcac:",(0,r.jsx)(s.br,{}),"\n","Commit changes with a specific commit message."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gco="git checkout"'})})," \ud83d\udd00:",(0,r.jsx)(s.br,{}),"\n","Switch branches or restore working directory files."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gbr="git branch"'})})," \ud83c\udf3f:",(0,r.jsx)(s.br,{}),"\n","List, create, or delete Git branches."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gb="git branch"'})})," \ud83c\udf31:",(0,r.jsx)(s.br,{}),"\n","List all branches in the repository."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gl="git log"'})})," \ud83d\udcd6:",(0,r.jsx)(s.br,{}),"\n","View the commit history with details like author and message."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias glg="git log --oneline --graph --all"'})})," \ud83d\uddc2\ufe0f\ud83d\udcca:",(0,r.jsx)(s.br,{}),"\n","View a visualized, condensed commit history (one-line format with a graph showing branching and merging)."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gst="git stash"'})})," \ud83d\uddc2\ufe0f\ud83d\udd12:",(0,r.jsx)(s.br,{}),"\n","Temporarily save changes that are not ready for commit."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gpo="git push origin"'})})," \ud83d\ude80\ud83c\udf0d:",(0,r.jsx)(s.br,{}),"\n","Push your local commits to the remote repository on the ",(0,r.jsx)(s.code,{children:"origin"})," remote."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gpl="git pull"'})})," \ud83d\udd04\ud83d\udd03:",(0,r.jsx)(s.br,{}),"\n","Pull changes from the remote repository (fetch and merge)."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gup="git pull --rebase"'})})," \ud83d\udd04\ud83d\udcc5:",(0,r.jsx)(s.br,{}),"\n","Pull changes from the remote repository but rebase your local commits on top of the remote branch."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gd="git diff"'})})," \ud83d\udd0d\ud83d\udcdd:",(0,r.jsx)(s.br,{}),"\n","Show changes between commits, working directory, and staged changes."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gds="git diff --staged"'})})," \ud83d\udcd1:",(0,r.jsx)(s.br,{}),"\n","Show the differences between the staged changes and the last commit."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gls="git ls-files"'})})," \ud83d\uddc3\ufe0f:",(0,r.jsx)(s.br,{}),"\n","List all files currently tracked by Git in the repository."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gcl="git clone"'})})," \ud83d\udee0\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Clone a Git repository into a new directory."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'alias gtag="git tag"'})})," \ud83c\udff7\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Create, list, or delete tags in the Git repository."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:"These Git aliases provide quick access to common Git operations, making version control more efficient and saving you time while working with Git repositories."}),"\n",(0,r.jsx)(s.p,{children:"Here are the explanations for your aliases across various tools, with some added emojis to make them more visually engaging:"}),"\n",(0,r.jsx)(s.h3,{id:"npm-aliases",children:"npm Aliases"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'ni="npm install"'})})," \ud83d\udee0\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Install dependencies for the project."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'nis="npm install --save"'})})," \ud83d\udcbe:",(0,r.jsx)(s.br,{}),"\n","Install and save the package in the ",(0,r.jsx)(s.code,{children:"dependencies"})," section of ",(0,r.jsx)(s.code,{children:"package.json"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'nisdev="npm install --save-dev"'})})," \ud83d\udee0\ufe0f\ud83d\udd27:",(0,r.jsx)(s.br,{}),"\n","Install and save the package as a development dependency."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'nup="npm update"'})})," \ud83d\udd04:",(0,r.jsx)(s.br,{}),"\n","Update all installed npm packages to their latest versions."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'nstart="npm start"'})})," \u25b6\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Start the application (runs the start script)."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'nrun="npm run"'})})," \u25b6\ufe0f\ud83d\udcbb:",(0,r.jsx)(s.br,{}),"\n","Run any custom npm script defined in ",(0,r.jsx)(s.code,{children:"package.json"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'ntest="npm test"'})})," \ud83e\uddea:",(0,r.jsx)(s.br,{}),"\n","Run tests defined in the ",(0,r.jsx)(s.code,{children:"test"})," script."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'nls="npm ls"'})})," \ud83d\udcdc:",(0,r.jsx)(s.br,{}),"\n","List all installed packages in the current project."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'nci="npm ci"'})})," \u26a1:",(0,r.jsx)(s.br,{}),"\n","Perform a clean install (faster and more predictable than ",(0,r.jsx)(s.code,{children:"npm install"}),")."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'nfund="npm fund"'})})," \ud83d\udcb0:",(0,r.jsx)(s.br,{}),"\n","Show the funding information for your project's dependencies."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'npublish="npm publish"'})})," \ud83d\udce6:",(0,r.jsx)(s.br,{}),"\n","Publish your package to the npm registry."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'nversion="npm version"'})})," \ud83d\udd22:",(0,r.jsx)(s.br,{}),"\n","View and manage versioning for your project."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'nrm="npm run"'})})," \ud83d\udd04:",(0,r.jsx)(s.br,{}),"\n","Run a specific npm script."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'nout="npm outdated"'})})," \u23f3:",(0,r.jsx)(s.br,{}),"\n","Check for outdated packages in your project."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"pnpm-aliases",children:"pnpm Aliases"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pni="pnpm install"'})})," \ud83d\udee0\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Install dependencies using pnpm."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pnis="pnpm install --save"'})})," \ud83d\udcbe:",(0,r.jsx)(s.br,{}),"\n","Install and save the package in ",(0,r.jsx)(s.code,{children:"dependencies"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pnisdev="pnpm install --save-dev"'})})," \ud83d\udee0\ufe0f\ud83d\udd27:",(0,r.jsx)(s.br,{}),"\n","Install and save the package as a development dependency."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pnm="pnpm manager"'})})," \u2699\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Use pnpm as the package manager."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pnup="pnpm update"'})})," \ud83d\udd04:",(0,r.jsx)(s.br,{}),"\n","Update all installed pnpm packages."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pnstart="pnpm start"'})})," \u25b6\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Start the application with pnpm."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pnrun="pnpm run"'})})," \u25b6\ufe0f\ud83d\udcbb:",(0,r.jsx)(s.br,{}),"\n","Run any script defined in ",(0,r.jsx)(s.code,{children:"package.json"})," using pnpm."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pntest="pnpm test"'})})," \ud83e\uddea:",(0,r.jsx)(s.br,{}),"\n","Run tests defined in the ",(0,r.jsx)(s.code,{children:"test"})," script using pnpm."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pnls="pnpm list"'})})," \ud83d\udcdc:",(0,r.jsx)(s.br,{}),"\n","List all installed pnpm packages."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pnci="pnpm ci"'})})," \u26a1:",(0,r.jsx)(s.br,{}),"\n","Perform a clean install with pnpm."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pnpublish="pnpm publish"'})})," \ud83d\udce6:",(0,r.jsx)(s.br,{}),"\n","Publish a package to the pnpm registry."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pnversion="pnpm version"'})})," \ud83d\udd22:",(0,r.jsx)(s.br,{}),"\n","View and manage versioning for your pnpm project."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pnout="pnpm outdated"'})})," \u23f3:",(0,r.jsx)(s.br,{}),"\n","Check for outdated pnpm packages."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"python-aliases",children:"Python Aliases"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'py="python"'})})," \ud83d\udc0d:",(0,r.jsx)(s.br,{}),"\n","Shortcut for the Python interpreter."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'py3="python3"'})})," \ud83d\udc0d3:",(0,r.jsx)(s.br,{}),"\n","Shortcut for Python 3 interpreter."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pip="pip3"'})})," \ud83d\udce6:",(0,r.jsx)(s.br,{}),"\n","Use ",(0,r.jsx)(s.code,{children:"pip3"})," to manage Python packages."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pipup="pip install --upgrade"'})})," \u2b06\ufe0f\ud83d\udce6:",(0,r.jsx)(s.br,{}),"\n","Upgrade pip packages."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pyvenv="python3 -m venv"'})})," \ud83d\udc0d\ud83e\uddf3:",(0,r.jsx)(s.br,{}),"\n","Create a Python virtual environment."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pyactivate="source venv/bin/activate"'})})," \ud83d\udd11:",(0,r.jsx)(s.br,{}),"\n","Activate a Python virtual environment."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pydeactivate="deactivate"'})})," \u274c:",(0,r.jsx)(s.br,{}),"\n","Deactivate the current Python virtual environment."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pyrun="python"'})})," \ud83d\udc0d\ud83c\udfc3\u200d\u2642\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Run a Python script."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pycheck="python -m py_compile"'})})," \ud83d\udd0d\ud83d\udcdd:",(0,r.jsx)(s.br,{}),"\n","Check Python script syntax without running it."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pytest="python -m pytest"'})})," \ud83e\uddea:",(0,r.jsx)(s.br,{}),"\n","Run tests with pytest."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pydoc="python -m pydoc"'})})," \ud83d\udcda:",(0,r.jsx)(s.br,{}),"\n","Launch Python documentation server."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pylist="pip list"'})})," \ud83d\udcdc:",(0,r.jsx)(s.br,{}),"\n","List installed Python packages."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pyfreeze="pip freeze"'})})," \u2744\ufe0f:",(0,r.jsx)(s.br,{}),"\n","List installed packages in ",(0,r.jsx)(s.code,{children:"requirements.txt"})," format."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pyinstall="pip install"'})})," \ud83d\udce6:",(0,r.jsx)(s.br,{}),"\n","Install Python packages."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'pyuninstall="pip uninstall"'})})," \u274c\ud83d\udce6:",(0,r.jsx)(s.br,{}),"\n","Uninstall Python packages."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"c-aliases",children:"C++ Aliases"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'cpp-compile="g++ -std=c++17 -Wall -Wextra -o output"'})})," \u2699\ufe0f\ud83d\udce6:",(0,r.jsx)(s.br,{}),"\n","Compile C++ code with standard C++17 features and output as ",(0,r.jsx)(s.code,{children:"output"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'cpp-run="g++ -std=c++17 -Wall -Wextra -o output && ./output"'})})," \u25b6\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Compile and run a C++ program."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'cpp-compile-opt="g++ -std=c++17 -O2 -Wall -Wextra -o output"'})})," \u2699\ufe0f\ud83d\udd27:",(0,r.jsx)(s.br,{}),"\n","Compile C++ code with optimizations (",(0,r.jsx)(s.code,{children:"-O2"}),")."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'cpp-clean="rm -f output"'})})," \ud83e\uddf9:",(0,r.jsx)(s.br,{}),"\n","Remove the compiled output file."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'cpp-build-all="g++ -std=c++17 -Wall -Wextra *.cpp -o output"'})})," \ud83d\udd28:",(0,r.jsx)(s.br,{}),"\n","Compile all ",(0,r.jsx)(s.code,{children:".cpp"})," files in the directory."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'cpp-edit="nano"'})})," \u270f\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Open the code in the ",(0,r.jsx)(s.code,{children:"nano"})," text editor."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'cpp-exec="./output"'})})," \u25b6\ufe0f\ud83d\udcbb:",(0,r.jsx)(s.br,{}),"\n","Execute the compiled output."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"c-aliases-1",children:"C Aliases"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'c-compile="gcc -std=c11 -Wall -Wextra -o output"'})})," \u2699\ufe0f\ud83d\udce6:",(0,r.jsx)(s.br,{}),"\n","Compile C code with standard C11 features and output as ",(0,r.jsx)(s.code,{children:"output"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'c-run="gcc -std=c11 -Wall -Wextra -o output && ./output"'})})," \u25b6\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Compile and run a C program."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'c-compile-opt="gcc -std=c11 -O2 -Wall -Wextra -o output"'})})," \u2699\ufe0f\ud83d\udd27:",(0,r.jsx)(s.br,{}),"\n","Compile C code with optimizations (",(0,r.jsx)(s.code,{children:"-O2"}),")."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'c-clean="rm -f output"'})})," \ud83e\uddf9:",(0,r.jsx)(s.br,{}),"\n","Remove the compiled output file."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'c-build-all="gcc -std=c11 -Wall -Wextra *.c -o output"'})})," \ud83d\udd28:",(0,r.jsx)(s.br,{}),"\n","Compile all ",(0,r.jsx)(s.code,{children:".c"})," files in the directory."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'c-edit="nano"'})})," \u270f\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Open the code in the ",(0,r.jsx)(s.code,{children:"nano"})," text editor."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'c-exec="./output"'})})," \u25b6\ufe0f\ud83d\udcbb:",(0,r.jsx)(s.br,{}),"\n","Execute the compiled output."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"rust-aliases",children:"Rust Aliases"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rustc="rustc"'})})," \u2699\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Compile Rust programs using the ",(0,r.jsx)(s.code,{children:"rustc"})," compiler."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-run="cargo run"'})})," \u25b6\ufe0f\ud83d\udce6:",(0,r.jsx)(s.br,{}),"\n","Run the current Rust project."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-build="cargo build"'})})," \ud83c\udfd7\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Build the current Rust project."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-build-rel="cargo build --release"'})})," \ud83c\udfd7\ufe0f\ud83d\ude80:",(0,r.jsx)(s.br,{}),"\n","Build the project in release mode for optimizations."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-test="cargo test"'})})," \ud83e\uddea:",(0,r.jsx)(s.br,{}),"\n","Run tests for the current project."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-clean="cargo clean"'})})," \ud83e\uddf9:",(0,r.jsx)(s.br,{}),"\n","Clean the build directory."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-fmt="cargo fmt"'})})," \ud83d\udd27\ud83d\udcd0:",(0,r.jsx)(s.br,{}),"\n","Format the Rust code."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-clippy="cargo clippy"'})})," \ud83d\udd0d:",(0,r.jsx)(s.br,{}),"\n","Run Clippy to check the code for potential issues."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-doc="cargo doc --open"'})})," \ud83d\udcda:",(0,r.jsx)(s.br,{}),"\n","Generate and open Rust documentation."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-new="cargo new"'})})," \ud83d\udee0\ufe0f\ud83d\udce6:",(0,r.jsx)(s.br,{}),"\n","Create a new Rust project."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-init="cargo init"'})})," \u2699\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Initialize a new Rust project in an existing directory."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-add="cargo add"'})})," \u2795:",(0,r.jsx)(s.br,{}),"\n","Add a dependency to the Rust project."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-upd="rustup update"'})})," \ud83d\udd04:",(0,r.jsx)(s.br,{}),"\n","Update the Rust toolchain."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-ver="rustc --version"'})})," \ud83d\udcc5:",(0,r.jsx)(s.br,{}),"\n","Display the version of ",(0,r.jsx)(s.code,{children:"rustc"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-watch="cargo watch -x run"'})})," \ud83d\udc40:",(0,r.jsx)(s.br,{}),"\n","Watch for changes in the Rust project and run automatically."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-deps="cargo tree"'})})," \ud83d\uddc2\ufe0f:",(0,r.jsx)(s.br,{}),"\n","Show the dependency tree of the Rust project."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-check="cargo check"'})})," \u2705:",(0,r.jsx)(s.br,{}),"\n","Check the code for errors without building it."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:'rust-ls="ls -alh --color=auto"'})})," \ud83d\udcc2:",(0,r.jsx)(s.br,{}),"\n","List the project directory contents with detailed info."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:"These aliases will help streamline your workflow in a variety of languages and package managers!"})]})}function x(n={}){const{wrapper:s}={...(0,c.R)(),...n.components};return s?(0,r.jsx)(s,{...n,children:(0,r.jsx)(h,{...n})}):h(n)}},6599:(n,s,e)=>{e.d(s,{R:()=>l,x:()=>d});var i=e(758);const r={},c=i.createContext(r);function l(n){const s=i.useContext(c);return i.useMemo((function(){return"function"==typeof n?n(s):{...s,...n}}),[s,n])}function d(n){let s;return s=n.disableParentContext?"function"==typeof n.components?n.components(r):n.components||r:l(n.components),i.createElement(c.Provider,{value:s},n.children)}}}]); |