Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ble.sh, bash line editor [ebuild + discussions]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3776
Location: Rasi, Finland

PostPosted: Sun Feb 18, 2024 10:02 am    Post subject: ble.sh, bash line editor [ebuild + discussions] Reply with quote

Does anyone here have used or uses ble.sh as readline replacement for bash?
I'd like to know before I possibly lock myself out of my system. :D

Also if you know other line editors that work with bash which could bring syntax highlight, please post about it.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!


Last edited by Zucca on Thu Feb 22, 2024 11:42 am; edited 1 time in total
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3977

PostPosted: Sun Feb 18, 2024 1:44 pm    Post subject: Reply with quote

Interesting...
No experience here.
Since it's activated via source, do you have any reason not to try & test it for a single non root user?

EDIT: I didn't get it at first, as you likely would rebuild as
Code:
USE=-readline emerge -1 app-shells/bash

Maybe the real question is about using such a setting for that package, whatever the status of ble.sh.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3776
Location: Rasi, Finland

PostPosted: Sun Feb 18, 2024 2:50 pm    Post subject: Reply with quote

USE=readline is forced for bash, but I think current stable portage shouldn't need it anymore.
I wonder if ble.sh can still be used with bash[readline]...
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22863

PostPosted: Sun Feb 18, 2024 4:43 pm    Post subject: Reply with quote

Bash supports --noediting to disable use of readline at runtime. Perhaps that would be sufficient to avoid the conflict?
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3776
Location: Rasi, Finland

PostPosted: Sun Feb 18, 2024 4:57 pm    Post subject: Reply with quote

Thanks, Hu. :)
I'll start experimenting when I have time. It seems there aren't many, if none at all, gentooers who have tried this.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3776
Location: Rasi, Finland

PostPosted: Sun Feb 18, 2024 6:53 pm    Post subject: Reply with quote

Hu wrote:
Bash supports --noediting to disable use of readline at runtime. Perhaps that would be sufficient to avoid the conflict?
Preliminary tests showed, that there's no conflict. I just cloned the git repo and "compiled" the project. Then sourced the script... It seems to work fine. :o

I'll conduct more tests. So far looking pretty good. It is slow at times, which is expected. On the other hand the new features it brings can speed up general bash usage.

EDIT: Tab completion example:
Code:
zucca@NBLK-WAX9X /tmp $ emerge --accept-properties
--accept-properties=ACCEPT_PROPERTIES       : This option temporarily overrides the ACCEPT_PROPERTIES variable. The A…
--accept-restrict=ACCEPT_RESTRICT           : This option temporarily overrides the ACCEPT_RESTRICT variable. The ACC…
--alert [ y | n ]                           : Add a terminal bell character (’\a’) to all interactive prompts. This i…
--alphabetical                              : When displaying USE and other flag output, combines the enabled and dis…
--ask [ y | n ]                             : Before performing the action, display what will take place (server info…
--ask-enter-invalid                         : When used together with the --ask option, interpret a single "Enter" ke…
--autounmask [ y | n ]                      : Automatically unmask packages and generate package.use settings as nece…
--autounmask-backtrack < y | n >            : Allow backtracking after autounmask has detected that configuration cha…
--autounmask-continue [ y | n ]             : Automatically apply autounmask changes to configuration files, and cont…
--autounmask-keep-keywords [ y | n ]        : If --autounmask is enabled, no package.accept_keywords changes will be …
--autounmask-keep-masks [ y | n ]           : If --autounmask is enabled, no package.unmask or ** keyword changes wil…
--autounmask-license < y | n >              : Allow autounmask package.license changes.
--autounmask-only [ y | n ]                 : Instead of doing any package building, just unmask packages and generat…
--autounmask-unrestricted-atoms [ y | n ]   : If --autounmask is enabled, keyword and mask changes using the ´=´ oper…
--autounmask-use < y | n >                  : Allow autounmask package.use changes. This option is enabled by default…
--autounmask-write [ y | n ]                : If --autounmask is enabled, changes are written to config files, respec…
--backtrack=COUNT                           : Specifies an integer number of times to backtrack if dependency calcula…
--binpkg-changed-deps [ y | n ]             : Tells emerge to ignore binary packages for which the corresponding ebui…
--binpkg-respect-use [ y | n ]              : Tells emerge to ignore binary packages if their USE flags don’t match t…
--buildpkg [ y | n ]                        : Tells emerge to build binary packages for all ebuilds processed in addi…
--buildpkg-exclude ATOMS                    : A space separated list of package atoms for which no binary packages sh…
--buildpkgonly                              : Creates binary packages for all ebuilds processed without actually merg…
--changed-deps [ y | n ]                    : Tells emerge to replace installed packages for which the corresponding …
--changed-deps-report [ y | n ]             : Tells emerge to report ebuilds for which the ebuild dependencies have c…
--changed-slot [ y | n ]                    : Tells emerge to replace installed packages for which the corresponding …
--changed-use                               : Tells emerge to include installed packages where USE flags have changed…
--check-news                                : Scan all repositories for relevant unread GLEP 42 news items, and displ…
--clean                                     : Cleans up the system by examining the installed packages and removing o…
--color < y | n >                           : Enable or disable color output. This option will override NO_COLOR and …
--columns                                   : Used alongside --pretend to cause the package name, new version, and ol…
--complete-graph [ y | n ]                  : This causes emerge to consider the deep dependencies of all packages fr…
--complete-graph-if-new-use < y | n >       : Trigger the --complete-graph behavior if USE or IUSE will change for an…
--complete-graph-if-new-ver < y | n >       : Trigger the --complete-graph behavior if an installed package version w…
--config                                    : Run package specific actions needed to be executed after the emerge pro…
--config-root=DIR                           : Set the PORTAGE_CONFIGROOT environment variable.
--debug                                     : Tells emerge to run the emerge command in --debug mode. In this mode th…
--deep [DEPTH]                              : This flag forces emerge to consider the entire dependency tree of packa…
--depclean                                  : Cleans the system by removing packages that are not associated with exp…
--depclean-lib-check [ y | n ]              : Account for library link-level dependencies during --depclean and --pru…
--deselect [ y | n ]                        : Remove atoms and/or sets from the world file. This action is implied by…
--digest                                    : Prevent corruption from being noticed. The ‘repoman manifest‘ command i…
--dynamic-deps < y | n >                    : In dependency calculations, substitute the dependencies of installed pa…
--emptytree                                 : Reinstalls target atoms and their entire deep dependency tree, as thoug…
--exclude ATOMS                             : A space separated list of package names or slot atoms. Emerge won’t ins…
--fail-clean [ y | n ]                      : Clean up temporary files after a build failure. This is particularly us…
--fetch-all-uri                             : Instead of doing any package building, just perform fetches for all pac…
--fetchonly                                 : Instead of doing any package building, just perform fetches for all pac…
--fuzzy-search [ y | n ]                    : Enable or disable fuzzy search for search actions. When fuzzy search is…
--getbinpkg [ y | n ]                       : Using the server and location defined in PORTAGE_BINHOST (see make.conf…
--getbinpkgonly [ y | n ]                   : This option is identical to -g, as above, except binaries from the remo…
--help                                      : Displays help information for emerge. Adding one of the additional argu…
--ignore-built-slot-operator-deps < y | n > : Ignore the slot/sub-slot := operator parts of dependencies that have be…
--ignore-default-opts                       : Causes EMERGE_DEFAULT_OPTS (see make.conf(5)) to be ignored.
--ignore-soname-deps < y | n >              : Ignore the soname dependencies of binary and installed packages. This o…
--ignore-world [ y | n ]                    : Ignore the @world package set and its dependencies. This may be useful …
--implicit-system-deps < y | n >            : Assume that packages may have implicit dependencies on packages which b…
--info                                      : Produces a list of information to include in bug reports which aids the…
--jobs[=JOBS]                               : [-j] Specifies the number of packages to build simultaneously. If this …
--keep-going [ y | n ]                      : Continue as much as possible after an error. When an error occurs, depe…
--list-sets                                 : Displays a list of available package sets.
--load-average[=LOAD]                       : [-l] Specifies that no new builds should be started if there are other …

_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3977

PostPosted: Mon Feb 19, 2024 8:22 am    Post subject: Reply with quote

Glad to see it works :)
Do you have plan for an ebuild?

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3776
Location: Rasi, Finland

PostPosted: Mon Feb 19, 2024 10:38 pm    Post subject: Reply with quote

CaptainBlood wrote:
Do you have plan for an ebuild?
Yes.
Makefile(s) need patching. Some targets want to run some git commands and it's driving me crazy.
I already managed to tell it not to fetch the git submodule (ebuild provides it now). Now it wants to determine commit hash based on the tag...
*sigh*
I'm going sleep. Maybe tomorrow.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3776
Location: Rasi, Finland

PostPosted: Wed Feb 21, 2024 5:47 pm    Post subject: Reply with quote

So I kinda forced it to work. Not pretty, but seems to work.
https://codeberg.org/Zucca/gentoo-overlay/src/branch/master/app-shells/blesh

If you install it using the ebuild above, then
Code:
source /usr/share/blesh/ble.sh
... will enable it. I'd maybe avoid putting that in any profile or rc script yet...
If you do, make sure you source it only on interactive bash sessions.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3977

PostPosted: Wed Feb 21, 2024 6:29 pm    Post subject: Reply with quote

Zucca wrote:
If you install it using the ebuild above, then
Code:
source /usr/share/blesh/ble.sh
... will enable it.
Currently manual activation only.

Nice experience at first try. 8)

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3776
Location: Rasi, Finland

PostPosted: Wed Feb 21, 2024 7:48 pm    Post subject: Reply with quote

CaptainBlood wrote:
Nice experience at first try. 8)
Thanks for testing. If you encounter any problems then, please, emerge the 9999 version.
I can craft new ebuild which installs current git HEAD pretty easily.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3776
Location: Rasi, Finland

PostPosted: Wed Feb 21, 2024 8:43 pm    Post subject: update Reply with quote

I did some releases.
Because so far I haven't had any problems It'll auto source ble.sh for non-root users for interactive shells.
Installs blesh_init into /etc/bash/bashrc.d/.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3977

PostPosted: Thu Feb 22, 2024 7:19 am    Post subject: Reply with quote

Because I just noted behavior reported above, I tried to visualize blesh-0.4.0_p3-r2.ebuild using home baked ebuild search and display script:
It failed miserably while reporting
Code:
A file is not listed in the Manifest: '/var/db/repos/zucca/app-shells/blesh/blesh-0.4.0_p3-r2.ebuild
Something likely requires a fix somewhere.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3977

PostPosted: Thu Feb 22, 2024 8:06 am    Post subject: Re: update Reply with quote

Zucca wrote:
Installs blesh_init into /etc/bash/bashrc.d/.

Wouldn't it be nice to be IUSE dependent, whether defaulted to OFF or ON?

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3776
Location: Rasi, Finland

PostPosted: Thu Feb 22, 2024 8:41 am    Post subject: Re: update Reply with quote

CaptainBlood wrote:
Zucca wrote:
Installs blesh_init into /etc/bash/bashrc.d/.

Wouldn't it be nice to be IUSE dependent, whether defaulted to OFF or ON?

Thks 4 ur attention, interest & support.
Done. On by default.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3977

PostPosted: Thu Feb 22, 2024 9:11 am    Post subject: Reply with quote

CaptainBlood wrote:
Code:
A file is not listed in the Manifest: '/var/db/repos/zucca/app-shells/blesh/blesh-0.4.0_p3-r2.ebuild
Something likely requires a fix somewhere.

Issue remains here still.8O

Thks 4 ur attention, interest & support.

_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3776
Location: Rasi, Finland

PostPosted: Thu Feb 22, 2024 9:30 am    Post subject: Reply with quote

Please sync again. There's no longer file with that name. And I tried to remove that also via git rm, but there's no record of it anymore.

EDIT: There was, indeed, a leftover from it when I dug a bit deeper. Should be fixed now.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3977

PostPosted: Thu Feb 22, 2024 10:48 am    Post subject: Reply with quote

Fixed here.
USE=-* in make.conf' brings expected behavior 8)

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3776
Location: Rasi, Finland

PostPosted: Thu Feb 22, 2024 11:38 am    Post subject: Reply with quote

If you prefer the non-auto route, please check that there isn't any leftovers in /etc/bash/bashrc.d/, although Portage should normally remove unmodified configs upon package removal... I think. I'm not 100% certain how the behavior is at default settings.

currently available blesh versions:
zucca@NBLK-WAX9X ~ $ eshowkw -O blesh
Keywords for app-shells/blesh:
                  |                               |   u   | 
                  | a   a     p s     l r   a     |   n   | 
                  | m   r h   p p   i o i s l m m | e u s | r
                  | d a m p p c a x a o s 3 p 6 i | a s l | e
                  | 6 r 6 p p 6 r 8 6 n c 9 h 8 p | p e o | p
                  | 4 m 4 a c 4 c 6 4 g v 0 a k s | i d t | o
------------------+-------------------------------+-------+------
        0.4.0_rc3 | ~ ~ ~ o o o o ~ o o ~ o o o o | 8 # 0 | zucca
[I]0.4.0_rc3_p132 | ~ ~ ~ o o o o ~ o o ~ o o o o | 8 o   | zucca
             9999 | o o o o o o o o o o o o o o o | 8 o   | zucca

_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3977

PostPosted: Thu Feb 22, 2024 1:04 pm    Post subject: Reply with quote

Code:
ls /etc/bash/bashrc.d
bash_completion.sh
seems clean enough 2 me 8)

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3776
Location: Rasi, Finland

PostPosted: Fri Feb 23, 2024 8:43 am    Post subject: Reply with quote

CaptainBlood wrote:
Code:
ls /etc/bash/bashrc.d
bash_completion.sh
Your bash completion doesn't interfere with ble.sh?
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3977

PostPosted: Fri Feb 23, 2024 10:31 am    Post subject: Reply with quote

Maybe it does...
However after backspacing completion tab request, initial completion list is removed when on blesh.
Thus providing sense of comfort here

Aside, colorful completion list here . :D

My 2 cent is that I would be horrified with ram comsuption.
So let's keep focused on features for the moment.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3776
Location: Rasi, Finland

PostPosted: Tue Feb 27, 2024 10:08 am    Post subject: Reply with quote

@CaptainBlood: Which version do you use, if any?
Any major bugs/problems with it?
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3977

PostPosted: Tue Feb 27, 2024 11:10 am    Post subject: Reply with quote

Installed versions: 0.4.0_rc3_p132^m(13:30:56 22/02/2024)(-auto-load)

It hasn't been manually activated for default user account, as I've lately mainly been tackling install issues from root session. I don't expect to activate blesh for root any soon.

I you have a test case not too difficult to reproduce here, I'd be glad to contribute...

Thks 4 ur attention, interest & support.
Слава Україні !
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3776
Location: Rasi, Finland

PostPosted: Tue Feb 27, 2024 7:16 pm    Post subject: Reply with quote

Everything's pretty ok here too. Although, as expected, ble.sh somewhat slows down interactive shell usage.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum