dotfiles

My dotfiles, nothing really interesting to see ...
git clone https://git.onna.be/dotfiles.git
Log | Files | Refs | README

commit 14444f0bf4bbae3fb3dbadb94574d368a65a9f26
parent 83e6b1a7df5f4d2ed100accbaff9514cfd43b4a1
Author: Paco Esteban <paco@onna.be>
Date:   Mon,  6 May 2019 15:51:42 +0200

zsh alias changes

google-cloud-sdk is everywhere now
"pastebin" function has an easier name
"g" alias for git is now a function that defaults to git status

Diffstat:
Mzsh/.zsh/aliases.zsh | 19++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/zsh/.zsh/aliases.zsh b/zsh/.zsh/aliases.zsh @@ -20,6 +20,8 @@ if [[ "$MYOS" == "OpenBSD" ]]; then alias cal='cal -m' alias ls='ls -F' alias gpg='gpg2' + alias Sprod='gcloud config configurations activate prod' + alias Sstg='gcloud config configurations activate default' CLIP_COMMAND="xclip -f -selection clipboard" fi if [[ "$MYOS" == "Darwin" ]]; then @@ -43,20 +45,27 @@ if [[ "$MYOS" == "Darwin" ]]; then alias ktopp='kubectl top pod' alias kctx='kubectx' alias kns='kubens' - alias gcil='gcloud compute instances list' - alias gcssh='gcloud compute ssh' - alias gcscp='gcloud compute scp' CLIP_COMMAND="pbcopy" fi alias lst='ls -latr' alias cp='cp -v' alias tm='tmux attach' -alias g='git' alias info='info --vi-keys' # GNU info act like man command alias figletfonts='ls -1 `figlet -I2` | grep "\.flf$" | cut -f 1 -d "." | sort -u' # list figlet fonts alias pdu='ncdu --color dark -rr' alias vim='nvim' +alias gcil='gcloud compute instances list' +alias gcssh='gcloud compute ssh' +alias gcscp='gcloud compute scp' + +g() { + if (( $# == 0 )); then + git status + else + git "$@" + fi +} # most used config files fast access cfg-nvim() { $EDITOR $HOME/.config/nvim/init.vim } @@ -189,7 +198,7 @@ function pubkey () { echo "=> Public key copied to clipboard." } # poor man's pastebin service (and secure !) -function pastesrv() { +function pb() { FILENAME="$1" if [[ -z "$FILENAME" ]]; then FILENAME=$(tr -cd '[:alnum:]' < /dev/urandom |dd bs=1 count=8 2>/dev/null)