You are not logged in.

#26 2006-09-27 13:51:17

smarcher
Member
From: Calcutta
Registered: 2003-12-12
Posts: 42
Website

Re: Another pacman script.

Excellent script!
Thanks!

Sudeep

Offline

#27 2006-09-27 15:35:21

wrythe
Member
From: Seattle, WA
Registered: 2006-08-15
Posts: 80

Re: Another pacman script.

Purch wrote:

I did more tests with two arch32 machines.

KDE - does not work (konsole, terminal)
gnome - does not work (urxvt, terminal, gnome-terminal)
E17 - does not work (xterm, terminal)
xfce OK (terminal)
consoles (ctrl+alt+F1) OK
ssh remote login OK

Amount of columns (tested with 80 and 209) in the terminal wont affect the result. Gnome and kde may have some java settings that makes pak crash.

I use Gnome exclusively and it works on my end. Can you do what I asked a few replies ago and send me the chuck of text that starts with "+ java -cp" after changing the first line of the script to "#!/bin/bash -x". It will help determine what is not getting sent to the Java file.


psearch - manipulate and refine pacman searches

Offline

#28 2006-09-27 15:36:24

wrythe
Member
From: Seattle, WA
Registered: 2006-08-15
Posts: 80

Re: Another pacman script.

smarcher wrote:

Excellent script!
Thanks!

Sudeep

My pleasure wink Have you had any problems with it? Some people are getting errors under certain terminal programs in certain desktop environments.


psearch - manipulate and refine pacman searches

Offline

#29 2006-09-28 07:33:41

Purch
Member
From: Finland
Registered: 2006-02-23
Posts: 229

Re: Another pacman script.

wrythe wrote:

send me the chuck of text that starts with "+ java -cp" after changing the first line of the script to "#!/bin/bash -x". It will help determine what is not getting sent to the Java file.

here is everything. Only one java line near the end.

Offline

#30 2006-09-28 14:39:22

wrythe
Member
From: Seattle, WA
Registered: 2006-08-15
Posts: 80

Re: Another pacman script.

Purch wrote:

here is everything. Only one java line near the end.

Well, it's definitely not sending $COLUMNS, and I wonder why since there's no reason it shouldn't be. Maybe it's trying to read it as a local variable for some odd reason. You could always try to add a line at the top of the script like:

cols=`echo $COLUMNS`

Then replace $COLUMNS with $cols in the Java line.


psearch - manipulate and refine pacman searches

Offline

#31 2006-09-28 19:12:19

mmccaskill
Member
From: NC
Registered: 2005-02-21
Posts: 163

Re: Another pacman script.

I tried that. It doesn't work.

EDIT: The problem is COLUMNS isn't being exported. I've added

export COLUMNS

in my .bashrc

Offline

#32 2006-09-28 23:17:32

wrythe
Member
From: Seattle, WA
Registered: 2006-08-15
Posts: 80

Re: Another pacman script.

mmccaskill wrote:

I tried that. It doesn't work.

EDIT: The problem is COLUMNS isn't being exported. I've added

export COLUMNS

in my .bashrc

Very interesting. I guess my question is this: Does anybody know of a way to calculate how many columns there are in the current terminal/console without using $COLUMNS?

While exporting in .bashrc works, it will stay that way throughout the session. For example, if you start your session with 80 columns then maxmize the screen to, I dunno, 200 columns, the word wrap will still treat it as if it's still 80 columns.

... It still makes me wonder why it works fine for some and not others.


psearch - manipulate and refine pacman searches

Offline

#33 2006-09-29 01:54:52

wrythe
Member
From: Seattle, WA
Registered: 2006-08-15
Posts: 80

Re: Another pacman script.

Purch wrote:
wrythe wrote:

send me the chuck of text that starts with "+ java -cp" after changing the first line of the script to "#!/bin/bash -x". It will help determine what is not getting sent to the Java file.

here is everything. Only one java line near the end.

OK, so I guess I learn something new every day. Apparently, as elucidated by mmccaskill, COLUMNS is not always exported. You can either do what he suggested by adding "export COLUMNS" in your .bashrc OR (this is what will be in the updated version) change $COLUMNS to

`tput cols`

in the script.

I'll throw an updated version on AUR when I get the chance.


psearch - manipulate and refine pacman searches

Offline

Board footer

Powered by FluxBB