You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
410 B
Fish
22 lines
410 B
Fish
function inbox -d "manipulate your inbox"
|
|
if test -z "$argv"
|
|
ls -1 --quoting-style=literal ~/inbox/ | string join ", "
|
|
return
|
|
end
|
|
|
|
if test "$argv" = "--clear"
|
|
rm -r ~/inbox/*
|
|
return
|
|
end
|
|
|
|
if echo "$argv" | grep -q " -mv "
|
|
set move_flag true
|
|
end
|
|
|
|
if test -f "$argv[1]" -o -d "$argv[1]"
|
|
cp -r "$argv[1]" ~/inbox/
|
|
else
|
|
echo -e (string join "\n" $argv[2..-1])"\n" > ~/inbox/$argv[1]
|
|
end
|
|
end
|