Compare commits

..

12 Commits

Author SHA1 Message Date
Xavier Logerais fe6642402b Merge branch 'master' of https://github.com/xlogerais/config-bash 2023-11-02 15:19:40 +01:00
Xavier Logerais a50a9359ad feat(aliases): désactivation de l'alias vim pointant vers lvim 2023-11-02 15:14:12 +01:00
Xavier Logerais 2fe787a370 feat(rc): Ajout d'une fonction de selection des branches git avec fzf 2023-11-02 15:12:25 +01:00
Xavier Logerais d4c31d32d9 feat(aliases): Modification des aliases pour git 2023-11-02 15:11:48 +01:00
Xavier Logerais 5aad94e71b feat(aliases): Ajout alias pour lazygit 2023-11-02 15:09:54 +01:00
Xavier Logerais 33c51aa0a6 feat(aliases): Ajout alias pour lsd 2023-11-02 15:09:28 +01:00
xavier 7176baf0bc Merge branch 'master' of https://gogs.logerais.com/xavier/config-bash 2023-04-03 10:46:33 +02:00
xavier 18ce1f6d7e feat: Support completion poetry 2023-04-03 10:45:44 +02:00
xavier 058c4f473c feat: support lvim/nvim pour les alias vim 2023-04-03 10:45:05 +02:00
xavier 1e20a91e84 feat: Ajout support broot 2023-04-03 10:43:57 +02:00
xavier 0e58fa99f4 feat: refacto aliases/completion kubectl, helm, stern 2023-04-03 10:38:42 +02:00
Xavier Logerais 2cae0f7d03 feat: improve powerline support 2022-12-13 12:04:08 +01:00
11 changed files with 87 additions and 42 deletions
+24 -24
View File
@@ -1,29 +1,29 @@
#!/bin/bash #!/bin/bash
# Git # Git
if [ -x /usr/bin/git ] if [ -x /usr/bin/git ]; then
then alias gs='git status'
alias gs='git status' alias ga='git add'
alias ga='git add' alias gc='git commit'
alias gc='git commit' alias gca='git commit -a'
alias gca='git commit -a' alias gf='git fetch'
alias gu='git pull' alias gu='git pull'
alias gp='git pull && git push' alias gp='git pull && git push'
alias gd='git diff' alias gd='git diff'
alias gdc='git diff --cached' alias gdc='git diff --cached'
alias gb='git branch' alias gb='git branch'
alias gco='git checkout' alias gco='git checkout'
alias gw='git whatchanged' alias gw='git whatchanged'
alias gl='git log --graph' alias gl='git log --graph'
alias gstatus='git status' alias gstatus='git status'
alias glog='git log' alias glog='git log'
alias glast='git last' alias glast='git last'
alias gshow='git show' alias gshow='git show'
alias gdiff='git diff' alias gdiff='git diff'
alias gcommit='git commit' alias gcommit='git commit'
alias gcommitall='git commit --all' alias gcommitall='git commit --all'
alias greset='git reset' alias greset='git reset'
alias gpull='git pull' alias gpull='git pull'
alias gpush='git pull && git push' alias gpush='git pull && git push'
fi fi
+1 -4
View File
@@ -1,11 +1,8 @@
#!/bin/bash #!/bin/bash
if (which kubectl &> /dev/null) if (command -v kubectl &> /dev/null)
then then
# activate completion
source <(kubectl completion bash)
# create a quick alias # create a quick alias
alias k=kubectl alias k=kubectl
alias ks="kubectl --namespace kube-system" alias ks="kubectl --namespace kube-system"
+5
View File
@@ -0,0 +1,5 @@
# Lazygit
if ( which lazygit &> /dev/null )
then
alias lg='lazygit'
fi
+5
View File
@@ -0,0 +1,5 @@
# LSD
if ( command -v lsd &> /dev/null )
then
alias ls='lsd'
fi
+15 -4
View File
@@ -1,9 +1,20 @@
#!/bin/bash #!/bin/bash
# Vim Editor # Vim Editor
if [ -x /usr/bin/vim ] if (command -v nvim &> /dev/null)
then then
alias vi='vim -p' alias vim=nvim
alias view='vim -R'
alias vless='vim -u /usr/share/vim/vim*/macros/less.vim'
fi fi
# if (command -v lvim &>/dev/null); then
# alias vim=lvim
# elif (command -v nvim &>/dev/null); then
# alias vim=nvim
# fi
# if [ -x /usr/bin/vim ]
# then
# alias vi='vim -p'
# alias view='vim -R'
# alias vless='vim -u /usr/share/vim/vim*/macros/less.vim'
# fi
+1 -4
View File
@@ -1,9 +1,6 @@
#!/bin/bash #!/bin/bash
if (which helm &> /dev/null) if (command -v helm &> /dev/null)
then then
# activate completion
source <( helm completion bash ) source <( helm completion bash )
fi fi
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
if ( which kubectl ) &> /dev/null if (command -v kubectl &> /dev/null)
then then
source <(kubectl completion bash) source <(kubectl completion bash)
fi fi
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
if ( command -v poetry &> /dev/null )
then
source <(poetry completions bash)
fi
+1 -4
View File
@@ -1,9 +1,6 @@
#!/bin/bash #!/bin/bash
if (which stern &> /dev/null) if (command -v stern &> /dev/null)
then then
# activate completion
source <(stern --completion bash) source <(stern --completion bash)
fi fi
+23 -1
View File
@@ -1 +1,23 @@
[[ -f ~/.config/broot/launcher/bash/br ]] && source ~/.config/broot/launcher/bash/br #!/bin/bash
if (command -v broot &>/dev/null); then
# This script was automatically generated by the broot program
# More information can be found in https://github.com/Canop/broot
# This function starts broot and executes the command
# it produces, if any.
# It's needed because some shell commands, like `cd`,
# have no useful effect if executed in a subshell.
function br {
local cmd cmd_file code
cmd_file=$(mktemp)
if broot --outcmd "$cmd_file" "$@"; then
cmd=$(<"$cmd_file")
rm -f "$cmd_file"
eval "$cmd"
else
code=$?
rm -f "$cmd_file"
return "$code"
fi
}
fi
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
if (command -v git && command -v fzf) &>/dev/null; then
function gsb { git checkout "$(git branch --all | fzf | tr -d '[:space:]')"; }
fi