better shell

This commit is contained in:
2025-09-29 15:19:53 +02:00
parent dcb6cd943d
commit 1a6fe0ca68
8 changed files with 73 additions and 40 deletions

View File

@@ -1,7 +1,6 @@
*
!.gitignore
!prompt.fish
!ssh-agent.fish
!theme.fish
!programs.fish
!alias.fish
!env.fish

49
fish/prev.d/alias.fish Normal file
View File

@@ -0,0 +1,49 @@
# fzf
if type -q fzf
fzf --fish | source
if type -q wl-copy
function fzc
fzf $argv | string collect | wl-copy
end
end
if type -q bat
alias fz="fzf --preview 'bat --style=numbers --color=always {}'"
end
end
# cd
if type -q zoxide
zoxide init fish | source
alias cd=z
end
# rm
if type -q trash
alias rm="echo \"use 'trash' instead :)\" && sh -c \"exit 42\" && echo why do you see this line :O"
end
# ls
if type -q eza
alias ll="eza -lh --group-directories-first --icons=auto"
alias la="eza -lh --group-directories-first --icons=auto --all"
alias lt="eza --tree --level=2 --long --icons --git"
else
alias ll="ls -lh --group-directories-first --color=auto"
alias la="ls -lah --group-directories-first --color=auto"
end
# directories
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
# grep
alias grep="grep --color=auto"
# nvim
if type -q nvim
set -x EDITOR nvim
set -x VISUAL nvim
end

View File

@@ -0,0 +1,4 @@
fish_add_path $HOME/.local/bin
fish_add_path $HOME/.cargo/bin
fish_add_path $HOME/go/bin
fish_add_path $HOME/.scripts

View File

@@ -1,18 +0,0 @@
if type -q fzf
fzf --fish | source
if type -q wl-copy
function fzc
fzf $argv | string collect | wl-copy
end
end
end
if type -q zoxide
zoxide init fish | source
alias cd=z
end
if type -q trash
alias rm="echo \"use 'trash' instead :)\" && sh -c \"exit 42\" && echo why do you see this line :O"
end