Skip to content

Instantly share code, notes, and snippets.

View danielbayley's full-sized avatar
👨‍💻
Working on too many things…

Daniel Bayley danielbayley

👨‍💻
Working on too many things…
View GitHub Profile
@danielbayley
danielbayley / git.zsh
Last active May 16, 2020 00:29
A useful shim for @git.
#! /bin/zsh --no-rcs --err-exit
# Git/Hub
# TODO $DOTFILES/git/clone.zsh #danielbayley/binstubs #/git
# https://github.com/xreader/git-for-humans
alias clone='git clone'
alias github=hub
#alias git-date='git commit date'
@danielbayley
danielbayley / pnpm.command
Last active August 4, 2023 18:19
A shim to seamlessly alias @npm to @pnpm.
#! /bin/zsh --no-rcs --err-exit
export PATH=node_modules/.bin:$PATH
alias -g i=install
if (($+commands[pnpm])) then
local p=p
alias pnpm=npm npx=pnpx
# FIXME https://github.com/pnpm/pnpm/issues/1360
npm config get -g global-dir | read
@danielbayley
danielbayley / stdin.zsh
Last active May 16, 2020 00:30
Make any command accept stdin.
#! /bin/zsh --no-rcs --err-exit
pushd = cd () { builtin $0 "${@:-`<&0`}"}
pwd # $HOME
print ~/Desktop | cd
pwd # ~/Desktop
cd -
pwd # $HOME
pwd # $HOME