Update bashrc to make it more flexible and add eget tools
This commit is contained in:
parent
59a1d3bb83
commit
aedb580510
36
dot_bashrc
36
dot_bashrc
@ -3,7 +3,6 @@
|
||||
|
||||
# Required init for cli programs
|
||||
# Do not install completions unless no working, check /usr/share/bash-completion
|
||||
eval "$(zoxide init bash)"
|
||||
|
||||
# Local bash-completion
|
||||
if [[ -f $HOME/.local/bin/bash_completion ]]; then
|
||||
@ -16,19 +15,27 @@ if [[ -f $HOME/.local/share/cargo/env ]]; then
|
||||
fi
|
||||
|
||||
# Set aliases
|
||||
alias grep="ugrep"
|
||||
alias cd="z"
|
||||
alias cat="bat -p"
|
||||
alias update-mirrors="rate-mirrors arch | sudo tee /etc/pacman.d/mirrorlist; rate-mirrors chaotic-aur | sudo tee /etc/pacman.d/chaotic-mirrorlist"
|
||||
alias update="paru; flatpak update"
|
||||
if hash rg 2>/dev/null; then
|
||||
alias grep="rg"
|
||||
fi
|
||||
if hash bat 2>/dev/null; then
|
||||
alias cat="bat -p"
|
||||
fi
|
||||
if hash zoxide 2>/dev/null; then
|
||||
alias cd="z"
|
||||
fi
|
||||
alias update="eget -D; . $HOME/.config/eget/post_install.sh"
|
||||
alias rc="source ~/.bashrc"
|
||||
function ls {
|
||||
if [[ "$@" =~ "-a" || "$@" =~ "-A" || "$@" =~ "--all" || "$@" =~ "--almost-all" ]]; then
|
||||
eza --icons --long $@
|
||||
else
|
||||
eza --icons --long --ignore-glob "$([[ -f .hidden ]] && cat .hidden | tr '\n' '|')" $@
|
||||
fi
|
||||
}
|
||||
if hash eza 2>/dev/null; then
|
||||
function ls {
|
||||
if [[ "$@" =~ "-a" || "$@" =~ "-A" || "$@" =~ "--all" || "$@" =~ "--almost-all" ]]; then
|
||||
eza --icons --long $@
|
||||
else
|
||||
eza --icons --long --ignore-glob "$([[ -f .hidden ]] && cat .hidden | tr '\n' '|')" $@
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
# Dotfiles management
|
||||
# TODO: Rewrite to use bash read instead of zsh read
|
||||
@ -91,3 +98,6 @@ PS1='[\u@\h \w]\$ '
|
||||
|
||||
# Starship after defining custom prompt, easy to remove
|
||||
eval "$(starship init bash)"
|
||||
|
||||
# Zoxide
|
||||
eval "$(zoxide init bash)"
|
||||
|
@ -1,2 +1,52 @@
|
||||
[global]
|
||||
target = "~/.local/bin"
|
||||
target = "~/.local/bin"
|
||||
upgrade_only = true
|
||||
|
||||
["zyedidia/eget"]
|
||||
|
||||
["zyedidia/micro"]
|
||||
asset_filters = [ "static", ".tar.gz" , "^sha" ]
|
||||
|
||||
["ip7z/7zip"]
|
||||
# Currently not working as 7zip packages use xz filters unsupported by eget/xz go library
|
||||
#file = "7zzs"
|
||||
#target = "~/.local/bin/7z"
|
||||
download_only = true
|
||||
|
||||
["sharkdp/bat"]
|
||||
asset_filters = [ "gnu", ".tar.gz" ]
|
||||
|
||||
["BurntSushi/ripgrep"]
|
||||
|
||||
["sharkdp/fd"]
|
||||
asset_filters = [ "gnu" ]
|
||||
|
||||
["sharkdp/hyperfine"]
|
||||
asset_filters = [ "gnu" ]
|
||||
|
||||
["ajeetdsouza/zoxide"]
|
||||
|
||||
["neovim/neovim"]
|
||||
asset_filters = [ "x86_64" ]
|
||||
target = "~/.local/bin/nvim"
|
||||
|
||||
["konosubakonoakua/ncdu-zig"]
|
||||
target = "~/.local/bin/ncdu"
|
||||
|
||||
["eza-community/eza"]
|
||||
asset_filters = [ "gnu", ".tar.gz" ]
|
||||
|
||||
["starship/starship"]
|
||||
asset_filters = [ "gnu" ]
|
||||
|
||||
["Byron/dua-cli"]
|
||||
|
||||
["doy/rbw"]
|
||||
|
||||
["twpayne/chezmoi"]
|
||||
asset_filters = [ "glibc", ".tar.gz" ]
|
||||
|
||||
["scop/bash-completion"]
|
||||
# Needs manual intervention to install, as its a bash script with a subfolder containing completions
|
||||
download_only = true
|
||||
asset_filters = [ ".tar.xz" ]
|
Loading…
x
Reference in New Issue
Block a user