mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-02 07:07:46 +00:00
commit
59e4a5601e
1 changed files with 3 additions and 2 deletions
|
@ -8,8 +8,9 @@ def dict [word: string] {
|
|||
let link = (build-string 'https://api.dictionaryapi.dev/api/v2/entries/en/' ($word|str find-replace ' ' '%20'))
|
||||
let output = (fetch $link |
|
||||
rename word)
|
||||
let w = ($output.word | first)
|
||||
|
||||
if $output.word == "No Definitions Found" {echo $output.word} {echo $output |
|
||||
if $w == "No Definitions Found" {echo $output.word} {echo $output |
|
||||
get meanings.definitions |
|
||||
select definition example
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue