You are not logged in.
Your example isn't very solid. We have -Ss search names and descriptions so you get more results that could possibly be what you are looking for. You have to grep for "/" so you get all package names, and no descriptions. If you really want, you could do
pacman -Sl | grep "something"
if you want less grepping.
Offline
Sorry Codemac, i just used that as an example, because it was in a previous post on the first page, I forgot to name that part of the discussion.
Leonardo Andrés Gallego
www.archlinux-es.org || Comunidad Hispana de Arch Linux
Offline
Oh, and for your comments about the ordering of the output, pacman shows the order that the packages will be installed. They are installed in a particular order so that dependencies are kept in check. After that, it's the order of mirrors in your pacman.conf. It's quite sensible.
Though the output when updating many packegs could be presented in a more readable fashion, not the thick block of text that's difficult to read. I like to scan through my updates to see if I'm doing anything that I might want to wait on doing, but the big block is annoying. Space saving, yes. Readable, no.
Offline
i think its a great idea to have a colorizet output OPTION for pacman. i wanted to post this idea on the forums, but i found this topic.
when pacman -Ss ends in a long list, it coult ease the readablity of the output. (if the repo name would be light gray, and the others stay dark gray, that would fine for me (if someone dont like the colors))
so please implement this fearure if its not a big work
(srry for my english)
Offline
The scripts posted above are nice, but they don't color repos that you don't predefine. This fixes that FWIW.
In my .bashrc I have:
alias pacs="pacsearch" pacsearch () { echo -e "$(pacman -Ss $@ | sed -e 's#current/.*#\033[0;31m&\033[0;37m#g' -e 's#extra/.*#\033[0;32m&\033[0;37m#g' -e 's#community/.*#\033[0;35m&\033[0;37m#g' -e 's#^.*/.* .*#\033[0;36m&\033[0;37m#g' )" }
I realize this is an old thread, but I just wanted to point out a small bug in this particular script since it's listed in the Wiki. If you're using a terminal that you have set the foreground color to a specific color, this script will override that color even after the search is done. For instance, in my mrxvtrc I have the foreground set to "blue", but after running "pacs whatever", my foreground is now a light grey. The script by raskolnikov fixes this, maybe it should be the one in the Wiki.
Daniel
Hi. I'm a sig. What are you?
Offline
I realize this is an old thread, but I just wanted to point out a small bug in this particular script since it's listed in the Wiki. If you're using a terminal that you have set the foreground color to a specific color, this script will override that color even after the search is done. For instance, in my mrxvtrc I have the foreground set to "blue", but after running "pacs whatever", my foreground is now a light grey. The script by raskolnikov fixes this, maybe it should be the one in the Wiki.
Daniel
You know you can edit the Wiki, because it's a wiki
Offline
You know you can edit the Wiki, because it's a wiki
Granted, but for all I know there's a very good reason why one is there and the other isn't. Plus, if there's someone currently maintaining that particular section, it's best to let them handle it.
Besides, it's not like it's a life or death problem here, just pointing it out.
Hi. I'm a sig. What are you?
Offline
After installing the new PKGBUILD I still don't get any colored output, what gives?
Installation went smoothly. I had to makepkg PKGBUILD, and then pacman -U pacman-blah.pkg.tar.gz.
Offline
citral wrote:The scripts posted above are nice, but they don't color repos that you don't predefine. This fixes that FWIW.
In my .bashrc I have:
alias pacs="pacsearch" pacsearch () { echo -e "$(pacman -Ss $@ | sed -e 's#current/.*#\033[0;31m&\033[0;37m#g' -e 's#extra/.*#\033[0;32m&\033[0;37m#g' -e 's#community/.*#\033[0;35m&\033[0;37m#g' -e 's#^.*/.* .*#\033[0;36m&\033[0;37m#g' )" }
I realize this is an old thread, but I just wanted to point out a small bug in this particular script since it's listed in the Wiki. If you're using a terminal that you have set the foreground color to a specific color, this script will override that color even after the search is done. For instance, in my mrxvtrc I have the foreground set to "blue", but after running "pacs whatever", my foreground is now a light grey. The script by raskolnikov fixes this, maybe it should be the one in the Wiki.
Daniel
Hmm, then it seems that your terminal doesn't handle the bash color codes properly. You could add a blue color as the last code in the script, or simply use what works for you.
There are several options for colored pacman output, and the one you quoted is the most elegant one, because it only requires a bash alias. (Imo)
One of the main causes of the fall of the Roman Empire was that, lacking zero,
they had no way to indicate successful termination of their C programs.
Offline
Hmm, then it seems that your terminal doesn't handle the bash color codes properly. You could add a blue color as the last code in the script, or simply use what works for you.
There are several options for colored pacman output, and the one you quoted is the most elegant one, because it only requires a bash alias. (Imo)
Understood. I just thought I'd point it out. The only real difference between your script and the one by raskolnikov is that your lines end in "0;37m#g" where his is "0;0m,g".
Hi. I'm a sig. What are you?
Offline
I think a colored output is not neccessary, but an empty line bitween the packages would make it more comfortable to read the output...
$ pacman -Ss pacman
current/pacman 2.9.8-1
A .tar.gz based package manager with dependency support
extra/namcap 1.5.4-1
A Pacman package analyzer
extra/srcpac 0.4.1-1
The pacman from-source wrapper
community/jacman 0.3.1-2
Java-based GUI front-end for pacman
Offline
Hmm, then it seems that your terminal doesn't handle the bash color codes properly. You could add a blue color as the last code in the script, or simply use what works for you.
There are several options for colored pacman output, and the one you quoted is the most elegant one, because it only requires a bash alias. (Imo)
Understood. I just thought I'd point it out. The only real difference between your script and the one by raskolnikov is that your lines end in "0;37m#g" where his is "0;0m,g".
Sorry my bad, I should've checked raskolnikov's script first. I think the 0;37 in my script should be 0;39, but I'm not near a terminal to check it.
One of the main causes of the fall of the Roman Empire was that, lacking zero,
they had no way to indicate successful termination of their C programs.
Offline
I think a colored output is not neccessary, but an empty line bitween the packages would make it more comfortable to read the output...
very good point
Offline
I think a colored output is not neccessary, but an empty line bitween the packages would make it more comfortable to read the output...
Hmmm... Nice idea, but that would make the result output longer for big searches. Maybe an empty line between repos ? Something like that :
$ pacman -Ss pacman
current/pacman 2.9.8-1
A .tar.gz based package manager with dependency support
extra/namcap 1.5.4-1
A Pacman package analyzer
extra/srcpac 0.4.1-1
The pacman from-source wrapper
community/jacman 0.3.1-2
Java-based GUI front-end for pacman
Add colors and it would be perfect (for me, at least)
edit: or maybe there should be a way to apply "themes" to pacman ? But I think that would make it more complicated and would not respect the KISS philosophy ?
Offline
Will pacman 3 have colored output?
Offline
hmm.. i think what is needed is, some coloured output, with spaces / n, and to prevent long search going offscreen, etc.. tail the output...
The.Revolution.Is.Coming - - To fight, To hunger, To Resist!
Offline
Will pacman 3 have colored output?
IIRC no.
to live is to die
Offline
I run Z-Shell (zsh), also, I run xterm with -bg black -fg white.
the following:
alias pacs="pacsearch"
pacsearch () {
echo -e "$(pacman -Ss $@ | sed
-e 's#current/.*#\033[0;31m&\033[0;37m#g'
-e 's#extra/.*#\033[0;32m&\033[0;37m#g'
-e 's#community/.*#\033[0;35m&\033[0;37m#g'
-e 's#^.*/.* .*#\033[0;36m&\033[0;37m#g' )"
}
put in my .bashrc, and running bash and typing 'pacsearch opera' does not return colored output.
Putting the same code in my .zshrc, while using zsh, still won't give me colored output.
Has anyone gotten this to work?
edit:
echo $TERM
xterm
I heard I need xterm-color; how can I get it?
Offline
EDIT: nevermind. I missread the post. sorry.
Hi. I'm a sig. What are you?
Offline
Hey, can you post a screen shot?
joe@trusktr.io - joe at true skater dot io.
Offline
Hey, can you post a screen shot?
You are talking to someone 4 years into the past.
Offline
Hey, can you post a screen shot?
I'm guessing you made a mistake, but nonetheless:
http://wiki.archlinux.org/index.php/For … Bumping.27
Offline
trusktr - not the first time you've done this. PLEASE read the guidelines linked above, and check the date of the last entry in a thread before posting.
Closed.
Offline