* How to package inputrc
@ 2020-07-12 22:01 Jonathan Brielmaier
2020-07-13 1:17 ` Bengt Richter
0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Brielmaier @ 2020-07-12 22:01 UTC (permalink / raw)
To: Guix-devel
Hi folks,
an annoying thing for me in a default Guix installation is the lack of
an inputrc definition[0]. So while using the shell I miss going through
my bash history via "page up"/"page down" keys.
To tackle this issue I created a simple inputrc and copied to
`/etc/inputrc`:
```
# alternate mappings for "page up" and "page down" to search the history
"\e[5~": history-search-backward
"\e[6~": history-search-forward
```
In order to achieve this more elegant I could write a simple service to
copy the file to /etc. Another option would be a small package.
I think other distros provide one in the default, basic installation:
ArchLinux[1], Debian[2] and openSUSE has even a longer one.
Are others missing that too? What do you think?
Good night
Jonathan
[0] https://wiki.archlinux.org/index.php/Readline
[1]
https://git.archlinux.org/svntogit/packages.git/plain/trunk/inputrc?h=packages/readline
[2] https://packages.debian.org/buster/all/readline-common/filelist
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to package inputrc
2020-07-12 22:01 How to package inputrc Jonathan Brielmaier
@ 2020-07-13 1:17 ` Bengt Richter
0 siblings, 0 replies; 6+ messages in thread
From: Bengt Richter @ 2020-07-13 1:17 UTC (permalink / raw)
To: Jonathan Brielmaier; +Cc: Guix-devel
On +2020-07-13 00:01:32 +0200, Jonathan Brielmaier wrote:
> Hi folks,
>
> an annoying thing for me in a default Guix installation is the lack of
> an inputrc definition[0]. So while using the shell I miss going through
> my bash history via "page up"/"page down" keys.
>
> To tackle this issue I created a simple inputrc and copied to
> `/etc/inputrc`:
> ```
What hat are you wearing? Admin or user as logged in, or user as user
of a particular app, or?
Of course, as owner of your machine, you may do as you please, if you can ;-)
But IMO user preferences should stay out of the root directory, like /etc/...
so I would put your mods in $HOME/.inputrc, as your ArchLinux referece [0] discusses,
or maybe under ~/.emacs.d/ if it's just emacs you want to tweak.
As you say, other distros provide defaults, but unless you want to modify
everyone's experience who logs in on the machine, I would say stick to
$HOME/.something, where something IMO should not be more global in effect than need be.
Think twice about anything you need sudo to accomplish :)
I think it is a kind of namespace hygiene problem, when it is not clear who gets
to define names and what they do under what circumstances.
My 2¢ ;-)
> # alternate mappings for "page up" and "page down" to search the history
> "\e[5~": history-search-backward
> "\e[6~": history-search-forward
> ```
>
> In order to achieve this more elegant I could write a simple service to
> copy the file to /etc. Another option would be a small package.
>
> I think other distros provide one in the default, basic installation:
> ArchLinux[1], Debian[2] and openSUSE has even a longer one.
>
> Are others missing that too? What do you think?
>
> Good night
> Jonathan
>
> [0] https://wiki.archlinux.org/index.php/Readline
> [1]
> https://git.archlinux.org/svntogit/packages.git/plain/trunk/inputrc?h=packages/readline
> [2] https://packages.debian.org/buster/all/readline-common/filelist
>
--
Regards,
Bengt Richter
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to package inputrc
@ 2020-07-13 17:26 Jesse Gibbons
2020-07-13 18:30 ` Efraim Flashner
0 siblings, 1 reply; 6+ messages in thread
From: Jesse Gibbons @ 2020-07-13 17:26 UTC (permalink / raw)
To: guix-devel
> In order to achieve this more elegant I could write a simple service to
> copy the file to /etc. Another option would be a small package.
I like the service idea a lot better. It appears to me that Guix is designed for services to deal with the more customizable parts of the installation, whereas packages are standard. /etc/inputrc is one of those things each system admin would want to customize, just like most of the things in /etc.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to package inputrc
2020-07-13 17:26 Jesse Gibbons
@ 2020-07-13 18:30 ` Efraim Flashner
2020-07-13 18:35 ` Efraim Flashner
0 siblings, 1 reply; 6+ messages in thread
From: Efraim Flashner @ 2020-07-13 18:30 UTC (permalink / raw)
To: Jesse Gibbons; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1438 bytes --]
On Mon, Jul 13, 2020 at 11:26:59AM -0600, Jesse Gibbons wrote:
> > In order to achieve this more elegant I could write a simple service to
> > copy the file to /etc. Another option would be a small package.
>
> I like the service idea a lot better. It appears to me that Guix is designed for services to deal with the more customizable parts of the installation, whereas packages are standard. /etc/inputrc is one of those things each system admin would want to customize, just like most of the things in /etc.
I'll go ahead and link to my os-release service here. It's a small
service that creates an /etc/os-release file. The service in action¹ and
the actual service itself. It would also be possible to create an even
simpler file than the one I made here², with something like this:
(define %inputrc
(plain-file "inputrc"
"set show-mode-in-prompt on\n"
"set enable-bracketed-paste on\n"
"set editing-mode vi\n"
"Control-l: clear-screen\n"
"set bell-style visible\n"))
¹ https://gitlab.com/Efraim/guix-config/-/blob/master/E5400_config.scm#L68
² https://gitlab.com/Efraim/guix-config/-/blob/master/config/os-release.scm
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to package inputrc
2020-07-13 18:30 ` Efraim Flashner
@ 2020-07-13 18:35 ` Efraim Flashner
2020-07-13 22:01 ` Marius Bakke
0 siblings, 1 reply; 6+ messages in thread
From: Efraim Flashner @ 2020-07-13 18:35 UTC (permalink / raw)
To: Jesse Gibbons; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1867 bytes --]
On Mon, Jul 13, 2020 at 09:30:31PM +0300, Efraim Flashner wrote:
> On Mon, Jul 13, 2020 at 11:26:59AM -0600, Jesse Gibbons wrote:
> > > In order to achieve this more elegant I could write a simple service to
> > > copy the file to /etc. Another option would be a small package.
> >
> > I like the service idea a lot better. It appears to me that Guix is designed for services to deal with the more customizable parts of the installation, whereas packages are standard. /etc/inputrc is one of those things each system admin would want to customize, just like most of the things in /etc.
>
> I'll go ahead and link to my os-release service here. It's a small
> service that creates an /etc/os-release file. The service in action¹ and
> the actual service itself. It would also be possible to create an even
> simpler file than the one I made here², with something like this:
>
> (define %inputrc
> (plain-file "inputrc"
> "set show-mode-in-prompt on\n"
> "set enable-bracketed-paste on\n"
> "set editing-mode vi\n"
> "Control-l: clear-screen\n"
> "set bell-style visible\n"))
The above wouldn't actually work. It needs a string-append or to not be
multiple strings.
> ¹ https://gitlab.com/Efraim/guix-config/-/blob/master/E5400_config.scm#L68
> ² https://gitlab.com/Efraim/guix-config/-/blob/master/config/os-release.scm
>
> --
> Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
> GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to package inputrc
2020-07-13 18:35 ` Efraim Flashner
@ 2020-07-13 22:01 ` Marius Bakke
0 siblings, 0 replies; 6+ messages in thread
From: Marius Bakke @ 2020-07-13 22:01 UTC (permalink / raw)
To: Efraim Flashner, Jesse Gibbons; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]
Efraim Flashner <efraim@flashner.co.il> writes:
> On Mon, Jul 13, 2020 at 09:30:31PM +0300, Efraim Flashner wrote:
>> On Mon, Jul 13, 2020 at 11:26:59AM -0600, Jesse Gibbons wrote:
>> > > In order to achieve this more elegant I could write a simple service to
>> > > copy the file to /etc. Another option would be a small package.
>> >
>> > I like the service idea a lot better. It appears to me that Guix is designed for services to deal with the more customizable parts of the installation, whereas packages are standard. /etc/inputrc is one of those things each system admin would want to customize, just like most of the things in /etc.
>>
>> I'll go ahead and link to my os-release service here. It's a small
>> service that creates an /etc/os-release file. The service in action¹ and
>> the actual service itself. It would also be possible to create an even
>> simpler file than the one I made here², with something like this:
>>
>> (define %inputrc
>> (plain-file "inputrc"
>> "set show-mode-in-prompt on\n"
>> "set enable-bracketed-paste on\n"
>> "set editing-mode vi\n"
>> "Control-l: clear-screen\n"
>> "set bell-style visible\n"))
>
> The above wouldn't actually work. It needs a string-append or to not be
> multiple strings.
Or use 'mixed-text-file' instead of 'plain-file'. Though 'string-join'
might be clearer in this case. :-)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-07-13 22:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-12 22:01 How to package inputrc Jonathan Brielmaier
2020-07-13 1:17 ` Bengt Richter
-- strict thread matches above, loose matches on Subject: below --
2020-07-13 17:26 Jesse Gibbons
2020-07-13 18:30 ` Efraim Flashner
2020-07-13 18:35 ` Efraim Flashner
2020-07-13 22:01 ` Marius Bakke
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.