[fix] Update nushell files

This commit is contained in:
Uttarayan
2023-10-13 18:21:22 +05:30
parent 42d7894d0a
commit 30bb3b49f9
5 changed files with 59 additions and 171 deletions

View File

@@ -0,0 +1,12 @@
def "cargo search" [ query: string, --limit=10] {
^cargo search $query --limit $limit
| lines
| each {
|line| if ($line | str contains "#") {
$line | parse --regex '(?P<name>.+) = "(?P<version>.+)" +# (?P<description>.+)'
} else {
$line | parse --regex '(?P<name>.+) = "(?P<version>.+)"'
}
}
| flatten
}