source ~/.config/nushell/init.nu # Change default config $env.config.cursor_shape = { emacs: block vi_insert: block vi_normal: underscore } # ls aliases alias builtin_ls = ls def l [dir?: string] { builtin_ls (if $dir == null { "" } else { $dir }) | sort-by type name -i | grid -c } def ls [dir?: string] { builtin_ls (if $dir == null { "" } else { $dir }) | sort-by type name -i | grid -c } def la [dir?: string] { builtin_ls -a (if $dir == null { "" } else { $dir }) | sort-by type name -i } def ll [dir?: string] { builtin_ls (if $dir == null { "" } else { $dir }) | sort-by type name -i } # cool df def df [] { ^df -h | str replace "Sys. de fichiers" "@1" | str replace "Monté sur" "@2" | detect columns | rename "Sys. de fichiers" "Taille" "Utilisé" "Dispo" "Uti%" "Monté sur" } # vim aliases alias v = nvim # git aliases alias g = git alias ga = git add alias gaa = git add --all alias gco = git checkout alias gcb = git checkout -b alias gc = git commit --verbose alias gca = git commit --verbose --all alias gd = git diff alias glog = git log --oneline --decorate --graph alias gl = git pull alias gp = git push alias gst = git status alias gs = git status def gpsup [] { git push --set-upstream origin (git rev-parse --abbrev-ref HEAD) } # Useful aliases alias :q = exit alias pdf = evince alias u = update alias rg = rg -uu alias p = pass alias pc = pass --clip export def-env mkcd [dir: string] { mkdir $dir; cd $dir } export def-env cdg [key: string] { cd (CLICOLOR_FORCE=1 pgd $key) } # Start tfetch tfetch