2 Commits 192deda18d ... c1ea6ac416

Auteur SHA1 Message Date
  Tom McKenzie c1ea6ac416 add ~/.local/bin to PATH il y a 1 an
  Tom McKenzie 11e6f1a75a bun and zoxide il y a 1 an
6 fichiers modifiés avec 25 ajouts et 3 suppressions
  1. 1 1
      .bashrc
  2. 1 0
      .gitignore_global
  3. 3 0
      .rc.d/aliases.sh
  4. 5 1
      .rc.d/git.sh
  5. 2 0
      .rc.d/lazy-nvm.sh
  6. 13 1
      .zshrc

+ 1 - 1
.bashrc

@@ -1,5 +1,5 @@
 # ensure /usr/local/bin is in path
-export PATH=/usr/local/bin:$PATH
+export PATH=/usr/local/bin:~/.local/bin:$PATH
 
 if [[ $- != *i* ]] ; then
   # shell is non-interactive. be done now!

+ 1 - 0
.gitignore_global

@@ -8,3 +8,4 @@ Icon
 ._*
 
 .todo
+bak

+ 3 - 0
.rc.d/aliases.sh

@@ -83,3 +83,6 @@ checkout() {
   git clone "$@" "$HOME/repos/$DIR" || return
   cd "$HOME/repos/$DIR" || return
 }
+
+alias pbjson="pbpaste | jq -r"
+alias pbjsons="pbpaste | jq -sRr '@json'"

+ 5 - 1
.rc.d/git.sh

@@ -10,7 +10,7 @@ alias gap='git apply'
 alias gb='git branch'
 alias gba='git branch -a'
 alias gbd='git branch -d'
-alias gbda='git branch --no-color --merged | command grep -vE "^(\*|\s*(master|develop|dev)\s*$)" | command xargs -n 1 git branch -d'
+alias gbda='git branch --no-color --merged | command grep -vE "^(\*|\s*(main|master|develop|dev)\s*$)" | command xargs -n 1 git branch -d'
 alias gbl='git blame -b -w'
 alias gbnm='git branch --no-merged'
 alias gbr='git branch --remote'
@@ -21,12 +21,14 @@ alias gbsr='git bisect reset'
 alias gbss='git bisect start'
 
 alias gc='git commit -v'
+alias gcx='git commit -v -m "✅" && git push'
 alias gc!='git commit -v --amend'
 alias gcn!='git commit -v --no-edit --amend'
 alias gca='git commit -v -a'
 alias gca!='git commit -v -a --amend'
 alias gcan!='git commit -v -a --no-edit --amend'
 alias gcans!='git commit -v -a -s --no-edit --amend'
+alias gcaa='git commit --amend'
 alias gcam='git commit -a -m'
 alias gcsm='git commit -s -m'
 alias gcb='git checkout -b'
@@ -72,3 +74,5 @@ alias gstp='git stash pop'
 alias gsts='git stash show --text'
 alias gsu='git submodule update'
 
+alias gp='git push'
+alias gpl='git pull'

+ 2 - 0
.rc.d/lazy-nvm.sh

@@ -6,6 +6,7 @@ function lazy_nvm {
   unset -f node
   unset -f npx
   unset -f yarn
+  unset -f pnpm
 
   if [ -d "${HOME}/.nvm" ]; then
     export NVM_DIR="$HOME/.nvm"
@@ -21,3 +22,4 @@ function npm { lazy_nvm; npm "$@"; }
 function node { lazy_nvm; node "$@"; }
 function npx { lazy_nvm; npx "$@"; }
 function yarn { lazy_nvm; yarn "$@"; }
+function pnpm { lazy_nvm; yarn "$@"; }

+ 13 - 1
.zshrc

@@ -1,6 +1,9 @@
 # benchmark startup:
 # zmodload zsh/zprof
 
+# ensure /usr/local/bin is in path
+export PATH=/usr/local/bin:~/.local/bin:$PATH
+
 # load all files from .shell/zshrc.d directory
 if [ -d $HOME/.zshrc.d ]; then
   for file in $HOME/.zshrc.d/*.zsh; do
@@ -27,5 +30,14 @@ if [ -f '/Users/tom/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/tom/google-
 # The next line enables shell command completion for gcloud.
 if [ -f '/Users/tom/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/tom/google-cloud-sdk/completion.zsh.inc'; fi
 
-
 if [ -f '/opt/homebrew/bin/brew' ]; then eval "$(/opt/homebrew/bin/brew shellenv)"; fi
+
+# bun completions
+[ -s "/Users/tom/.bun/_bun" ] && source "/Users/tom/.bun/_bun"
+
+# bun
+export BUN_INSTALL="$HOME/.bun"
+export PATH="$BUN_INSTALL/bin:$PATH"
+
+# zoxide
+if command -v zoxide >/dev/null 2>&1; then eval "$(zoxide init zsh)"; fi