Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 874351

Summary: [Tracker] "eselect MODULE set N" should output a confirmation of the selected option
Product: Gentoo Linux Reporter: Andrew Church <achurch+gentoo>
Component: Current packagesAssignee: Gentoo eselect Team <eselect>
Status: CONFIRMED ---    
Severity: enhancement Keywords: Tracker
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 874618, 874612    
Bug Blocks:    

Description Andrew Church 2022-10-03 06:42:20 UTC
Currently, using "eselect MODULE set N" to select an alternative for a module does not produce any output, so the user must follow up with "eselect MODULE list" to confirm the result of selection:

$ eselect wine list
Available wine versions:
  [1]   wine-proton-7.0.4 *
  [2]   wine-vanilla-7.18
$ eselect wine set 2
$ eselect wine list
Available wine versions:
  [1]   wine-proton-7.0.4
  [2]   wine-vanilla-7.18 *

Contrast other configurators, such as gcc-config, which do produce output:

$ gcc-config -l
 [1] x86_64-pc-linux-gnu-11.3.0 *
 [2] x86_64-pc-linux-gnu-12.2.0
$ gcc-config 2
 * Switching native-compiler to x86_64-pc-linux-gnu-12.2.0 ... [ ok ]

Having this output from a "set" operation is useful to confirm that (for example) the user hasn't misread the option list and selected an unintended option, and it would be helpful if eselect implemented this behavior.
Comment 1 Ulrich Müller gentoo-dev 2022-10-03 08:32:13 UTC
The set command isn't implemented in eselect's core, but in each module separately. Some modules are silent but others are verbose:

# eselect editor list
Available targets for the EDITOR variable:
  [1]   nano *
  [2]   ed
  [3]   emacs
  [4]   ex
  [5]   vi
  [6]   xemacs
  [ ]   (free form)
# eselect editor set 3
Setting EDITOR to emacs ...
Run ". /etc/profile" to update the variable in your shell.

If you want to follow up with this, I'd suggest that you report bugs for the individual modules.
Comment 2 Andrew Church 2022-10-03 10:02:21 UTC
Thanks for the input, will do.
Comment 3 Ulrich Müller gentoo-dev 2022-10-04 08:00:21 UTC
Let's make this a tracker.