2023-05-14 17:24:43 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [[ -z "$@" ]]; then
|
2024-11-03 01:59:02 +00:00
|
|
|
echo "^f .*$"
|
2023-05-14 17:24:43 +00:00
|
|
|
elif [[ "$1" == "--hint" ]]; then
|
2024-11-03 01:59:02 +00:00
|
|
|
shift
|
2023-05-14 17:24:43 +00:00
|
|
|
elif [[ "$1" == "--complete" ]]; then
|
2024-11-03 01:59:02 +00:00
|
|
|
shift
|
|
|
|
echo "0 $@"
|
2023-05-14 17:24:43 +00:00
|
|
|
elif [[ "$1" == "--preview" ]]; then
|
2024-11-03 01:59:02 +00:00
|
|
|
shift
|
2024-11-03 23:36:22 +00:00
|
|
|
URL="$(echo "$@" | cut -d ' ' -f3-)"
|
2024-11-03 01:59:02 +00:00
|
|
|
echo "Will open '$URL' in firefox"
|
2023-05-14 17:24:43 +00:00
|
|
|
elif [[ "$1" == "--run" ]]; then
|
2024-11-03 01:59:02 +00:00
|
|
|
shift
|
2024-11-20 07:08:16 +00:00
|
|
|
URL="$(echo "$1" | cut -d ' ' -f2-)"
|
|
|
|
setsid -f firefox "$URL"
|
2023-05-14 17:24:43 +00:00
|
|
|
fi
|