You are not logged in.

#1 2011-06-03 03:57:21

firyice
Member
From: NJ
Registered: 2011-05-27
Posts: 15

[SOLVED] surfraw bash-completion

I recently installed surfraw

sudo pacman -S surfraw

Under ubuntu, there was a bash completion file that installed with it. 
/etc/bash_completion.d/surfraw
as you can see here:
http://packages.ubuntu.com/natty/all/surfraw/filelist

The arch package however does not have this file, and so bash completion does not work.  I understand that arch is a minimalist distribution, and the package maintainer may simply have ommited this package under their own discretion. 

Since this is the case, my question is:  How do I Install surfraw correctly with bash completion?

I tried downloading straight from the surfraw website and Follow their instructions:
http://surfraw.alioth.debian.org/#downloading

./configure
make
make install

Not only did I still not have bash completion, but now surfraw is not working at all.

Any and all suggestions welcome.  Thanks in advanced!

Note:  I will be back to check up on this thread at 8:00am EST

Bonus:  If you are a surfraw user, share your favorite elvi's!

Last edited by firyice (2011-06-03 12:46:53)

Offline

#2 2011-06-03 04:56:53

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: [SOLVED] surfraw bash-completion

I'm not sure about your problem, (I've never tried surfraw, but I think I might just have to), but remembered seeing this thread, https://bbs.archlinux.org/viewtopic.php?id=116811

Offline

#3 2011-06-03 06:46:21

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] surfraw bash-completion

I would surmise that the reason that it is not included in the Arch package is it is not necessary. By adding the elvi directory to your path, you get completion (as well as doing away with the need to prefix the command with sr or surfraw).

man surfraw wrote:

Adding the elvi to your path
       If  you are a regular user of surfraw, you will probably get sick of typing sr or surfraw each
       time. You can regain the old behaviour of running the elvi directly by adding the elvi  direc‐
       tory (/usr/lib/surfraw) to your path, either manually or using surfraw-update-path(1)

As to your other issue: I know hearing this after the fact is not helpful, but installing without using pacman is something you would only do if you really knew what you were doing.

Remove all the files manually and reinstall with pacman and you should be good to go.

As for favourite elvi (apart from those in the thread stlarch linked to - which have been committed and will appear in the next release), I mostly use duckduckgo and wikipedia.

# edit BUT if you really wanted completion like in Ubuntu, you could copy the surfraw_bash_completion script to /etc/bash_completion.d/surfraw and that should probably work...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2011-06-03 12:46:09

firyice
Member
From: NJ
Registered: 2011-05-27
Posts: 15

Re: [SOLVED] surfraw bash-completion

jasonwryan wrote:

I would surmise that the reason that it is not included in the Arch package is it is not necessary. By adding the elvi directory to your path, you get completion (as well as doing away with the need to prefix the command with sr or surfraw).

man surfraw wrote:

Adding the elvi to your path
       If  you are a regular user of surfraw, you will probably get sick of typing sr or surfraw each
       time. You can regain the old behaviour of running the elvi directly by adding the elvi  direc‐
       tory (/usr/lib/surfraw) to your path, either manually or using surfraw-update-path(1)

This is what I'll do, after fixing my botched install. 

jasonwryan wrote:

...if you really knew what you were doing.

this is my goal right here


Thank you for such a complete answer.  Also, as an aside,  your github configs have been some of the most helpful to me in customizing my arch setup.

And... [SOLVED]

Last edited by firyice (2011-06-03 12:46:34)

Offline

#5 2011-06-03 19:19:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] surfraw bash-completion

firyice wrote:
jasonwryan wrote:

...if you really knew what you were doing.

this is my goal right here


Thank you for such a complete answer.  Also, as an aside,  your github configs have been some of the most helpful to me in customizing my arch setup.

You are heading in the right direction smile

Good to see someone else attesting to the truth:

Surfraw manifesto wrote:

Reclaim heathen lands. Bear witness to the truth. Its love will set you free.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB