LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-07-2020, 02:04 AM   #1
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Rep: Reputation: 253Reputation: 253Reputation: 253
How do I make sbopkg's bash-completion pick up the SBo-git repository (-current) rather than SBo?


I am trying to read /usr/share/bash-completion/completions/sbopkg , but don't seem to grasp it so far.

Is there a way to make bash-completion suggest packages from Matteo's repository?
 
Old 05-07-2020, 04:27 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
I'm on Slackware64 and don't have that file.

SBo = slackbuilds, afaik where you grab a single slackbuild and build the source. The stuff to change is in the first few lines of a slackbuild.

For more complicated & automagic stuff, you probably need slackpkg, which is a totally different animal.

Bash completion is down to what bash knows. For instance, I have only one file bginning with 'g'in my homedir; so if I type 'g<Tab> in bash, it will complete the filename. You left us short on more specific information. You'd be better posting again, with your actual problem, as most of probably aren't on the same page as you.
 
Old 05-07-2020, 04:51 AM   #3
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Original Poster
Rep: Reputation: 253Reputation: 253Reputation: 253
This file is in /extra/bash-completion-*

There is even a Slackware Wiki page on it:

https://slackwiki.com/Bash_Autocompletion
 
Old 05-07-2020, 04:53 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
I'm not a Slacker, but as I understand it from looking at the completion code, you don't need to touch it at all. All the relevant settings are in /etc/sbopkg/sbopkg.conf:
Code:
QUEUEDIR=${QUEUEDIR:-/var/lib/sbopkg/queues}
REPO_ROOT=${REPO_ROOT:-/var/lib/sbopkg}
...
REPO_BRANCH=${REPO_BRANCH:-14.2}
REPO_NAME=${REPO_NAME:-SBo}
The relevant parts of the completion code are these:
Code:
local config="/etc/sbopkg/sbopkg.conf"
...
. $config
...
COMPREPLY=( $( sed -ne "/^SLACKBUILD NAME: $cur/{s/^SLACKBUILD NAME: //;p}"\
    $REPO_ROOT/$REPO_NAME/$REPO_BRANCH/SLACKBUILDS.TXT )
    $( cd $QUEUEDIR; compgen -f -X "!*.sqf"  -- "$cur" ) )

Last edited by shruggy; 05-07-2020 at 05:06 AM.
 
2 members found this post helpful.
Old 05-07-2020, 11:30 AM   #5
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
sbotools is another option if you want -current support for SBo. The various tools (sboremove, sboinstall, sboupgrade, etc) come with zsh completions. Would be cool if someone would convert those to bash
 
Old 05-07-2020, 11:43 AM   #6
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
Quote:
Originally Posted by business_kid View Post
SBo = slackbuilds, afaik where you grab a single slackbuild and build the source. The stuff to change is in the first few lines of a slackbuild.
He's talking about using a particular interface to SBo (sbopkg), but he wants it to use the development repo of SBo instead of the usual public one for stable (and have the bash completions work, which come from extra/bash-completion in this case).
Quote:
Originally Posted by business_kid View Post
For more complicated & automagic stuff, you probably need slackpkg, which is a totally different animal.
slackpkg is about installing from pre-prepared packages. There's the slackpkg+ addon to make it easy to use additional repos, although this is not the same as SBo, which provides scripts to build additional software from source.
Quote:
Originally Posted by business_kid View Post
Bash completion is down to what bash knows. For instance, I have only one file bginning with 'g'in my homedir; so if I type 'g<Tab> in bash, it will complete the filename. You left us short on more specific information. You'd be better posting again, with your actual problem, as most of probably aren't on the same page as you.
And bash can "know more" if someone writes a completion for a particular program E.g., if /usr/share/bash-completion/completions/sbopkg exists, and you type: sbopkg <tab>, then the logic of the completion file will kick in. Zsh has a very nice completion system by the way, although I only use it interactive, #!/usr/bin/env bash for scripts.

Last edited by drgibbon; 05-07-2020 at 04:52 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Sbopkg and installed SBo-git packages (Not appears) Gugur Slackware 12 03-18-2022 12:03 AM
upgrade all SBo packages to SBo-git lioh Slackware 5 08-08-2019 06:45 AM
[SOLVED] Can't sync slackbuilds git master repository with sbopkg Daedra Slackware 3 02-04-2016 12:05 AM
[SOLVED] Can't install Git repo (I don't git git ) Nemus Linux - Software 3 05-20-2011 02:09 PM
SBo-git - slackbuilds.org on git (with patches for current) ponce Slackware 47 03-12-2011 05:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration