Skip to content
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.

Compact cver option #414

Closed
adamralph opened this issue Feb 4, 2014 · 13 comments
Closed

Compact cver option #414

adamralph opened this issue Feb 4, 2014 · 13 comments

Comments

@adamralph
Copy link

When checking what needs updating with cver, the output is very bloated and requires a lot of scrolling to view, e.g.
image

I'd like to see nice compact output like the following:

Name            Installed           Available           Upgradable 
=============== =================== =================== ==========
7zip            9.22.01.20130618    9.22.01.20130618    
7zip.install    9.22.01.20130618    9.22.01.20130618    
Console2        2.0.148             2.0.148
fiddler4        4.4.5.8             4.4.5.920130128     Y
git             1.8.4               1.8.5.2             Y
git.install     1.8.4               1.8.5.2             Y
...

Perhaps the current output can stay as the default with the compact output as an option. Or perhaps the compact should be the default with the verbose being an option.

@ivlists
Copy link

ivlists commented Feb 4, 2014

👍

@RichiCoder1
Copy link
Contributor

This actually brings up another question of mine. Being powershell, you should be able to do something like:

chocolatey version all | Format-Table

For some reason, though, chocolatey's output is just a string.

@RichiCoder1
Copy link
Contributor

I feel a little dumb now. The output is a string because you're not calling the ps1 directly, but rather chocolatey.cmd which calls chocolatey.ps1. The batch file's output is, of course, a string.

If you want to get the output in a nice table, you can do this:

C:\Chocolatey\chocolateyinstall\chocolatey.ps1 Version All | Format-Table name, found, latest, verMessage

Edit: If you want to get really crazy, you can do something like:

C:\Chocolatey\chocolateyinstall\chocolatey.ps1 Version All | Select-Object -Property @{n = 'Name'; e = {$_.name}}, @{ n = 'Installed'; e = {$_.found}}, @{n = 'Available'; e = {$_.latest}}, @{n = 'Upgradable'; e = { if($_.found -eq $_.latest) { "N" } else {"Y"}}}

@adamralph
Copy link
Author

@RichiCoder1 that's a great workaround in the meantime 😎.

Thanks very much!

@ferventcoder
Copy link
Contributor

Good workaround, but don't depend on it. I think what you noted above should be the default, so 👍

@jmenchacavr
Copy link

👍

@ferventcoder
Copy link
Contributor

How does this look?

This uses limitoutput option (-r) to keep the information relevant. false at the end tells you whether it is pinned or not:

c:\> choco upgrade all --noop -r
linqpad|2.46.09|4.51.03|false
grepwin|1.6.1|1.6.6|false
vim|7.4.27|7.4.560|false
sumatrapdf.commandline|2.5.2|3.0|false
notepadplusplus.install|6.7.3|6.7.4|false
mingw|4.8.1.20140107|4.8.3.20141208|false
1password|1.0.9.341|4.1.0.530|false
notepadplusplus.commandline|6.7.2|6.7.4|false
PowerShell|4.0.20140915|4.0.20141001|false
autohotkey|1.1.16.05|1.1.19.02|false
webpicommandline|7.1.40719.0|7.1.50430.0|false
chocolatey.server|0.1.0|0.1.1|false
wincommandpaste|1.0.6|1.0.8|false
git|1.9.4|1.9.5.20150114|false
javaruntime|7.0.51|7.0.75|false
gitextensions|2.47.3|2.48.03|false
fiddler|2.4.5.3|2.4.9.8|false
VirtualCloneDrive|5.4.6.20130920|5.4.7.0|false
ChocolateyPackageUpdater|0.6.2.0|0.6.4.0|false
git.commandline|1.9.4|1.9.5|false
TestDriven.Net|3.3.2779|3.5.2830|false
DotNet3.5|3.5|3.5.20140403|false
resharper|8.0.2000.2660|9.0.1|false
yumi|2.0.0.8|2.0.1.5|false
notepadplusplus|6.7.3|6.7.4|false
autohotkey.install|1.1.16.05|1.1.19.02|false
papercut|2013.6.10.2|2014.11.5|false
puppet|3.7.0|3.7.4|false
ccleaner|4.17.4808|5.02.5101|false
keepass.portable|2.27|2.28|false
sumatrapdf|2.5.2|3.0|false
pip|1.1.1|1.2.0|false
ruby.devkit|4.5.2.20111231|4.5.2.20120101|false
boxstarter.chocolatey|1.0.33|2.4.159|false
autohotkey_l|1.1.11.01|1.1.14.20140119|false
DotNet4.0|4.0.30319.20130222|4.0.30319.20141222|false
ketarin|1.6.0.434|1.7.1|false
nodejs|0.10.30|0.10.36|false
autohotkey.portable|1.1.18.00|1.1.19.02|false
Pester|2.0.2|3.3.5|false
WindowsLiveWriter|2011.0.0|2012.0.0|false
dropbox|2.8.4|3.0.5|false
webpicmd|7.1.50430.0|7.1.50430.20141001|false

This is ONLY the pacakges that have upgrades available by the way.

C:\> choco list -lo
Chocolatey v0.9.9.0 (this is green, choco heading)
1password 1.0.9.341
7zip 9.22.01.20130618
7zip.commandline 9.20.0.20130618
7zip.install 9.22.01.20130618
aacgain 1.9.0.2
Atom 0.146.0
autohotkey 1.1.16.05
autohotkey.install 1.1.16.05
autohotkey.portable 1.1.18.00
autohotkey_l 1.1.11.01
baretail 3.50.0.20120226
beyondcompare 3.3.8.16340
binroot 0.03
boxstarter.bootstrapper 1.0.33
boxstarter.chocolatey 1.0.33
BoxStarter.Common 1.0.33
BoxStarter.WinConfig 1.0.33
ccleaner 4.17.4808
chocolatey 0.9.8.23
chocolatey.server 0.1.0
ChocolateyGUI 0.11.4
ChocolateyPackageUpdater 0.6.2.0
clink.portable 0.4.2
ConEmu 13.12.25.0
Console2 2.0.148
Devbox-Common 1.0.2
Devbox-Common.extension 1.0.1
disableuac 0.0.2
DotNet3.5 3.5
DotNet4.0 4.0.30319.20130222
DotNet4.5 4.5.20120822
dotPeek 1.1.1.33
dropbox 2.8.4
easy.install 0.6.11.4
EthanBrown.ConEmuConfig 0.0.5
expresso 3.0.4750
fiddler 2.4.5.3
git 1.9.4
git.commandline 1.9.4
git.install 1.9.5.20150114
gitextensions 2.47.3
GitReleaseNotes 0.5.0
GnuWin 0.6.3.1
googlechrome 28.0.1500.71
grepwin 1.6.1
hg 3.2.3
ilspy 2.1.0.1000
imagemagick.tool 6.9.0.2
InstEd 1.5.15.26
iscommandlineapp 1.0.0
javaruntime 7.0.51
jq 1.0.3
kdiff3 0.9.97
keepass.portable 2.27
ketarin 1.6.0.434
launchy 2.5.0.20140301
lessmsi 1.1.7
linqpad 2.46.09
lockhunter 3.0.2
MailViewer 3.1
mingw 4.8.1.20140107
mysql 5.6.19
nodejs 0.10.30
nodejs.commandline 0.10.30.20140818
notepadplusplus 6.7.3
notepadplusplus.commandline 6.7.2
notepadplusplus.install 6.7.3
npm 1.4.9
NuGet.CommandLine 2.8.2
NugetPackageExplorer 3.8.0
paint.net 3.5.11.20130909
pandoc 1.12
papercut 2013.6.10.2
peco 0.2.2
Pester 2.0.2
PhantomJS 1.9.7
pidgin 2.10.7.1
pik 0.3.0
pip 1.1.1
pngoptimizer 2.4
pngoptimizer.commandline 2.4
poshgit 0.5.0.201401009
PowerGUI 3.8.0.129
PowerShell 4.0.20140915
PreCode.WLW 5.02
puppet 3.7.0
putty 0.63
putty.portable 0.63
python 2.7.5
Recuva 1.51.1063
RegShot 1.9.2
resharper 8.0.2000.2660
roundhouse 0.8.5.0
ruby 2.1.5
ruby.devkit 4.5.2.20111231
ruby.portable 2.0.0.48100
ruby2.devkit 4.7.2.2013022402
scala.portable 2.11.4
sharpkeys 3.5.0
SourceCodePro 1.017.1
stexbar 1.8.4
SublimeText2 2.0.2.2221
sumatrapdf 2.5.2
sumatrapdf.commandline 2.5.2
sysinternals 2013.12.19.20140121
TestDriven.Net 3.3.2779
toolsroot 0.1.0
underscore 1.0.0
underscore-compiled 1.0.2
underscore-script 1.0.2
ussf 1.5.0
vcredist2008 9.0.30729.1
vcredist2010 10.0.40219.1
vim 7.4.27
VirtualCloneDrive 5.4.6.20130920
vlc 2.1.3
warmup 0.6.5.1
webpicmd 7.1.50430.0
webpicommandline 7.1.40719.0
Wget 1.11.4.1
wincommandpaste 1.0.6
windirstat 1.1.2.20140225
WindowsLiveInstaller 2012.0.0
WindowsLiveWriter 2011.0.0
winflexbison 2.4.1.20140103
Wix35 3.5.2519.20130612
yumi 2.0.0.8
127 packages installed.

@adamralph
Copy link
Author

A table would be better but I can understand the difficulty in determining column widths. Perhaps a space either side of the pipe symbol would be a bit more readable?

What do you mean by 'pinned'?

@ferventcoder
Copy link
Contributor

That did just point out a possible bug in new choco install logic. NOTE: It believes chocolatey 0.9.8.23 is installed. :/

@ferventcoder
Copy link
Contributor

Pinned, means you "pin" to a particular version. It's a way to suppress upgrades...

@ferventcoder
Copy link
Contributor

Attempting to upgrade shows the proper version:
image

It's there in the package directory:
image

But list, not so much. Shows last release version of everything. Anyone want to guess what I forgot to pass? Yes, -pre. Listing what you have installed should include and prefer a prerelease. Otherwise it can get confusing about what version you actually have installed. So it's a bug.

@ferventcoder
Copy link
Contributor

chocolatey/choco#46 (and fixed)

@ferventcoder
Copy link
Contributor

FYI, the -r option is meant for machines to read, not humans. But at least it's a start for taking something over and piping it to a posh script.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants