Skip to content

Instantly share code, notes, and snippets.

@spiralx
Forked from tj/profile.js
Created January 5, 2017 15:33
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 spiralx/1d71c2b51d4a020e3085fe5197f5d3b3 to your computer and use it in GitHub Desktop.
Save spiralx/1d71c2b51d4a020e3085fe5197f5d3b3 to your computer and use it in GitHub Desktop.
nshell profile
/**
* Module dependencies.
*/
var path = require('path')
// prompt
exports.PS1 = function(){
var dir = path.basename(process.cwd())
return ' λ ' + dir + ': '
}
// misc
shell.alias('ll', 'ls -la')
shell.alias('copy', 'pbcopy')
shell.alias('paste', 'pbpaste')
// editor
shell.alias('m', 'mate')
// make
shell.alias('mt', 'make test')
shell.alias('mc', 'make clean')
// npm
shell.alias('ni', 'npm install')
shell.alias('np', 'npm publish')
// burl
shell.alias('GET', 'burl GET')
shell.alias('HEAD', 'burl -I')
shell.alias('POST', 'burl POST')
shell.alias('PUT', 'burl PUT')
shell.alias('PATCH', 'burl PATCH')
shell.alias('DELETE', 'burl DELETE')
shell.alias('DEL', 'burl DELETE')
shell.alias('OPTIONS', 'burl OPTIONS')
// git
shell.alias('gd', "git diff | mate")
shell.alias('ga', "git add")
shell.alias('gs', "git summary")
shell.alias('gbd', "git branch -D")
shell.alias('gst', "git status")
shell.alias('gc', "git commit -m")
shell.alias('gca', "git commit -a -m")
shell.alias('gm', "git merge --no-ff")
shell.alias('gpt', "git push --tags")
shell.alias('gp', "git push")
shell.alias('gpr', "git pull-request")
shell.alias('grh', "git reset --hard")
shell.alias('gb', "git branch")
shell.alias('gcob', "git checkout -b")
shell.alias('gco', "git checkout")
shell.alias('gba', "git branch -a")
shell.alias('gcp', "git cherry-pick")
shell.alias('gl', "git log --pretty', 'format:%Cgreen%h%Creset %an - %s' --graph")
shell.alias('docs', "rm -fr /tmp/docs && cp -fr docs /tmp/docs && git checkout gh-pages && cp -fr /tmp/docs/* .")
shell.alias('gpom', "git pull origin master")
shell.alias('gcd', 'cd "`git rev-parse --show-toplevel`"')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment