|
@@ -9,7 +9,9 @@ export PATH="$PATH:$HOME/.local/bin:$HOME/bin"
|
|
|
|
|
|
# Setup user-specific Python overrides
|
|
# Setup user-specific Python overrides
|
|
if [ "$OS" = "Darwin" ]; then
|
|
if [ "$OS" = "Darwin" ]; then
|
|
- export PATH="$HOME/Library/Python/2.7/bin:$PATH:$HOME/bin"
|
|
|
|
|
|
+ for PY_DIR in "$HOME/Library/Python/"*/; do
|
|
|
|
+ export PATH="$PY_DIR/bin:$PATH"
|
|
|
|
+ done
|
|
fi
|
|
fi
|
|
|
|
|
|
# Homebrew
|
|
# Homebrew
|
|
@@ -97,6 +99,7 @@ alias vi=vim
|
|
# aliases for node
|
|
# aliases for node
|
|
alias node-print="node -e 'let [,f=\".\",e=\"this\"]=process.argv,ctx; try{ctx=require(f)}catch{ctx=require(path.resolve(f))}; eval(\`(async function(){ with(this) return (\${e}); })\`).call(ctx).then(console.log,e=>{console.error(e);process.exit(1)})'"
|
|
alias node-print="node -e 'let [,f=\".\",e=\"this\"]=process.argv,ctx; try{ctx=require(f)}catch{ctx=require(path.resolve(f))}; eval(\`(async function(){ with(this) return (\${e}); })\`).call(ctx).then(console.log,e=>{console.error(e);process.exit(1)})'"
|
|
alias node-print-json="node -e 'let [,f=\".\",e=\"this\"]=process.argv,ctx; try{ctx=require(f)}catch{ctx=require(path.resolve(f))}; eval(\`(async function(){ with(this) return (\${e}); })\`).call(ctx).then(o=>console.log(JSON.stringify(o,null,2)),e=>{console.error(e);process.exit(1)})'"
|
|
alias node-print-json="node -e 'let [,f=\".\",e=\"this\"]=process.argv,ctx; try{ctx=require(f)}catch{ctx=require(path.resolve(f))}; eval(\`(async function(){ with(this) return (\${e}); })\`).call(ctx).then(o=>console.log(JSON.stringify(o,null,2)),e=>{console.error(e);process.exit(1)})'"
|
|
|
|
+alias node-print-table="node -e 'let [,f=\".\",e=\"this\"]=process.argv,ctx; try{ctx=require(f)}catch{ctx=require(path.resolve(f))}; eval(\`(async function(){ with(this) return (\${e}); })\`).call(ctx).then(console.table,e=>{console.error(e);process.exit(1)})'"
|
|
alias node-print-deep="node -e 'let [,f=\".\",e=\"this\"]=process.argv,ctx; try{ctx=require(f)}catch{ctx=require(path.resolve(f))}; eval(\`(async function(){ with(this) return (\${e}); })\`).call(ctx).then(o=>console.log(require(\"util\").inspect(o,{depth:process.env.DEPTH||Infinity})),e=>{console.error(e);process.exit(1)})'"
|
|
alias node-print-deep="node -e 'let [,f=\".\",e=\"this\"]=process.argv,ctx; try{ctx=require(f)}catch{ctx=require(path.resolve(f))}; eval(\`(async function(){ with(this) return (\${e}); })\`).call(ctx).then(o=>console.log(require(\"util\").inspect(o,{depth:process.env.DEPTH||Infinity})),e=>{console.error(e);process.exit(1)})'"
|
|
alias node-print-repl="node -e 'let [,f=\".\",e=\"this\"]=process.argv,ctx; try{ctx=require(f)}catch{ctx=require(path.resolve(f))}; eval(\`(async function(){ with(this) return (\${e}); })\`).call(ctx).then((r)=>(console.log(r,\`\n = \\\$1\`),repl.start().context.\$1=r),e=>{console.error(e);process.exit(1)})'"
|
|
alias node-print-repl="node -e 'let [,f=\".\",e=\"this\"]=process.argv,ctx; try{ctx=require(f)}catch{ctx=require(path.resolve(f))}; eval(\`(async function(){ with(this) return (\${e}); })\`).call(ctx).then((r)=>(console.log(r,\`\n = \\\$1\`),repl.start().context.\$1=r),e=>{console.error(e);process.exit(1)})'"
|
|
alias env-ts-node="TS_NODE_FILES=true NODE_OPTIONS=\"-r ts-node/register \$NODE_OPTIONS\""
|
|
alias env-ts-node="TS_NODE_FILES=true NODE_OPTIONS=\"-r ts-node/register \$NODE_OPTIONS\""
|
|
@@ -108,6 +111,9 @@ alias ts-node-print="env-ts-node node-print"
|
|
# color json
|
|
# color json
|
|
! command -v json >/dev/null || alias json="json -o inspect"
|
|
! command -v json >/dev/null || alias json="json -o inspect"
|
|
|
|
|
|
|
|
+# color theme setup for bat (not aliased to cat directly because it's a bit slow)
|
|
|
|
+command -v bat >/dev/null || export BAT_THEME="$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo 'Visual Studio Dark+' || echo GitHub)"
|
|
|
|
+
|
|
# MacVim shell aliases
|
|
# MacVim shell aliases
|
|
if [ "$OS" = "Darwin" ]; then
|
|
if [ "$OS" = "Darwin" ]; then
|
|
alias gvim="mvim"
|
|
alias gvim="mvim"
|