mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-01-23 02:49:06 +00:00
This change allows the dotfiles to work with chezmoi (e.g: on windows) and improves grepability with neovim/telescope
12 lines
380 B
Nu
12 lines
380 B
Nu
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
|
|
} |