mirror of
https://github.com/eoli3n/dotfiles
synced 2024-11-29 17:18:13 +01:00
added test.fish
This commit is contained in:
parent
e37efd5293
commit
46f8be776f
17
roles/fish/files/fish/cli/functions/test.fish
Executable file
17
roles/fish/files/fish/cli/functions/test.fish
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/fish
|
||||
|
||||
# base : https://github.com/fish-shell/fish-shell/issues/939#issuecomment-22058614
|
||||
|
||||
# upload image : up file.png
|
||||
# upload piped data : cat file.txt | up
|
||||
# upload clipboard : up
|
||||
# validation : if filetype is txt then open vim to valid or edit
|
||||
# catch url : middle clic to paste url
|
||||
|
||||
# If filename as argument
|
||||
if isatty stdin
|
||||
cat $argv
|
||||
# Else piping data
|
||||
else
|
||||
cat -
|
||||
end
|
3
roles/fish/files/fish/cli/functions/up.fish
Normal file
3
roles/fish/files/fish/cli/functions/up.fish
Normal file
@ -0,0 +1,3 @@
|
||||
function up
|
||||
~/bin/up $argv;
|
||||
end
|
Loading…
Reference in New Issue
Block a user