Browse Source

js: fix redir issue in ls-versions

pull/8/merge
DanielFGray 2 years ago
parent
commit
c30d0de921
  1. 11
      js

11
js

@ -67,12 +67,11 @@ aliases[lsv]='ls-versions' @@ -67,12 +67,11 @@ aliases[lsv]='ls-versions'
helptext['ls-versions']='list and install versions'
subcmd_ls-versions() {
local package="$1"
npm --json view "$package" |
jq -r '.versions[]' | # label with .dist-tags?
fzf --tac --preview="npm view ${package}@{1}" \
--header="choose version for $package | C-d saves as devDependency" \
--bind="enter:execute:subcmd_install '${package}@{1}' <> /dev/tty" \
--bind="ctrl-d:execute:subcmd_install -D '${package}@{1}' <> /dev/tty"
fzf --tac --preview="npm view ${package}@{1}" \
--header="choose version for $package | C-d saves as devDependency" \
--bind="enter:execute:subcmd_install '${package}@{1}' <> /dev/tty" \
--bind="ctrl-d:execute:subcmd_install -D '${package}@{1}' <> /dev/tty" \
< <(npm --json view "$package" | jq -r '.versions[]') # label with .dist-tags?)
}
export -f subcmd_ls-versions

Loading…
Cancel
Save