fish: init

This commit is contained in:
Nico 2025-06-21 20:10:57 +10:00
parent eda1f4129c
commit 69ceb5dcc5
14 changed files with 171 additions and 1 deletions

View file

@ -0,0 +1,9 @@
function 0x0 --description 'Uploads a file or folder to 0x0.st'
if test -d "$argv"
set TMPFILE "$(mktemp --suffix '.tar')"
tar cf "$TMPFILE" "$argv"
curl -F file="@$TMPFILE" -F expires=24 https://0x0.st
else
curl -F file=@"$argv" -F expires=24 https://0x0.st
end
end

View file

@ -0,0 +1,4 @@
function cat --wraps=bat --description 'alias cat bat'
bat $argv
end

View file

@ -0,0 +1,4 @@
function la --wraps='ls -ah --color=auto' --description 'alias la=ls -ah --color=auto'
ls -ah --color=auto $argv
end

View file

@ -0,0 +1,4 @@
function ll --wraps='ls -l' --wraps='ls -ahl --color=auto' --description 'alias ll=ls -ahl --color=auto'
ls -ahl --color=auto $argv
end

View file

@ -0,0 +1,4 @@
function ls --description 'alias ls=ls -h --color=auto'
command ls -h --color=auto $argv
end

View file

@ -0,0 +1,6 @@
function posix-source
for i in (cat $argv)
set arr (echo $i |tr = \n)
set -gx $arr[1] $arr[2]
end
end

View file

@ -0,0 +1,4 @@
function rm --wraps=trash --description 'alias rm trash'
trash $argv
end

View file

@ -0,0 +1,4 @@
function v --wraps=nvim --description 'alias v nvim'
nvim $argv
end

View file

@ -0,0 +1,4 @@
function vi --wraps=nvim --description 'alias vi nvim'
nvim $argv
end

View file

@ -0,0 +1,4 @@
function vim --wraps=nvim --description 'alias vim nvim'
nvim $argv
end