1
0
Fork 0

fish: permissions

This commit is contained in:
Von Random 2025-01-02 19:09:29 +02:00
parent 1ec56b52e5
commit 2be735284e
31 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,7 @@
set -x LESS 'i n M R S'
set -x PAGER less
set -x EDITOR hx
set -x TIME_STYLE long-iso
set -x SSH_AUTH_SOCK "$XDG_RUNTIME_DIR/ssh-agent.socket"
set -x ALTERNATE_EDITOR ""
set -U fish_greeting

View file

@ -0,0 +1,3 @@
if status is-interactive
starship init fish | source
end

View file

@ -0,0 +1,3 @@
function atmux
tmux attach || tmux
end

View file

@ -0,0 +1,3 @@
function cm
command chezmoi $argv
end

View file

@ -0,0 +1,3 @@
function diff
command diff --color $argv
end

View file

@ -0,0 +1,3 @@
function g
command lazygit $argv
end

View file

@ -0,0 +1,3 @@
function gci
command git commit $argv
end

View file

@ -0,0 +1,3 @@
function grep
command grep --color=auto $argv
end

View file

@ -0,0 +1,6 @@
function greset
read -P "OK to reset and clean teh repo?"\n -ln1 resp
test "$resp" != y && return 0
command git clean -fd
command git reset --hard
end

View file

@ -0,0 +1,6 @@
function groot
set -l is_git_worktree (command git rev-parse --is-inside-work-tree)
string match -qe 'true' "$is_git_worktree" || return
set -l root (command git rev-parse --show-toplevel)
test $status -eq 0 && cd $root
end

View file

@ -0,0 +1,3 @@
function gsi
termcompat tig status
end

View file

@ -0,0 +1,3 @@
function gsl
command git stash list $argv
end

View file

@ -0,0 +1,3 @@
function gss
command git status -sbu $argv
end

View file

@ -0,0 +1,3 @@
function gsw
command git switch $argv
end

View file

@ -0,0 +1,3 @@
function gup
command git pull $argv
end

View file

@ -0,0 +1,5 @@
function gwta
groot && cd ..
command git worktree add $argv
cd $argv
end

View file

@ -0,0 +1,3 @@
function gwtp
command git worktree prune --verbose
end

View file

@ -0,0 +1,3 @@
function k
command kubectl $argv
end

View file

@ -0,0 +1,3 @@
function kc
command kubectl config $argv
end

View file

@ -0,0 +1,3 @@
function kg
command kubectl get $argv
end

View file

@ -0,0 +1,3 @@
function kshell
command kubectl exec -n "$1" --stdin --tty "$2" -- /bin/sh
end

View file

@ -0,0 +1,3 @@
function ksw
command kubecm switch $argv
end

View file

@ -0,0 +1,3 @@
function ll
ls -alg $argv
end

View file

@ -0,0 +1,3 @@
function ls
command eza --group-directories-first --icons $argv
end

View file

@ -0,0 +1,3 @@
function rgrep
grep --exclude-dir=.git -R $argv
end

View file

@ -0,0 +1,3 @@
function s
termcompat ssh $argv
end

View file

@ -0,0 +1,3 @@
function tailf
command less +F $argv
end

View file

@ -0,0 +1,15 @@
function termcompat
set -l term $TERM
switch $term
case 'alacritty*' 'kitty*' 'wezterm' 'xterm-*'
set term xterm
case 'rxvt-unicode-*'
set term rxvt-unicode
case 'tmux*'
set term screen.xterm-new
end
begin
set -lx TERM $term
command $argv
end
end

View file

@ -0,0 +1,3 @@
function tig
termcompat tig $argv
end

View file

@ -0,0 +1,3 @@
function tmux
command tmux -2 $argv
end

View file

@ -0,0 +1,3 @@
function whence
command -v $argv
end