14 lines
292 B
Fish
Executable file
14 lines
292 B
Fish
Executable file
#!/usr/bin/env fish
|
|
|
|
set default "https://marginalia-search.com/search?query="
|
|
set ddg "https://duckduckgo.com/?q="
|
|
|
|
set input (prompt)
|
|
set split_input (string split -m 1 ":" $input)
|
|
|
|
switch $split_input[1]
|
|
case "d"
|
|
xdg-open "$ddg$split_input[2]"
|
|
case "*"
|
|
xdg-open "$default$input"
|
|
end
|