feat: add fish functions
This commit is contained in:
parent
8fe5a249b0
commit
053876bb52
2 changed files with 28 additions and 0 deletions
14
home/private_dot_config/private_fish/functions/0x.fish
Normal file
14
home/private_dot_config/private_fish/functions/0x.fish
Normal file
|
@ -0,0 +1,14 @@
|
|||
function 0x --description "upload/shorten to 0x0 services"
|
||||
switch $argv[1]
|
||||
case "file" "f"
|
||||
curl -F "file=@$argv[2]" https://envs.sh
|
||||
case "i"
|
||||
curl -F "file=@-" https://envs.sh
|
||||
case "link" "fl"
|
||||
curl -F "url=$argv[2]" https://envs.sh
|
||||
case "shorten" "l"
|
||||
curl -F "shorten=$argv[2]" https://envs.sh
|
||||
case "*"
|
||||
printf "Usage: 0x [file|link|shorten] <file/url>\n 0x i to read from standard input."
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue