What shell do you guys use? - BSD
zge
On the topic of shells, does anyone know how to get ksh's "horizontal line scrolling" feature in bash? That's really the only thing (except maybe for the cleanness of ksh) that I notice and prefer over bash. I keep on using bash because of it's superior auto-completion, though.
wolf
(18-06-2020, 03:13 PM)jkl Wrote: I admit that I hadn’t tested it on a real Solaris yet, but wouldn’t pkgsrc work?

Probably would work. But I can't due to some company rules. But I'll try it on OpenIndiana.
phillbush
(18-06-2020, 04:15 PM)zge Wrote: On the topic of shells, does anyone know how to get ksh's "horizontal line scrolling" feature in bash? That's really the only thing (except maybe for the cleanness of ksh) that I notice and prefer over bash. I keep on using bash because of it's superior auto-completion, though.

Put the following in your ~/.inputrc
Code:
set horizontal-scroll-mode on
eadwardus
I use mksh as interactive shell, and rc/posix shell to write scripts. But for me, any shell with auto-completion serves its purpose as interactive shell, as i usually use it only to run commands.
zge
(21-06-2020, 12:21 PM)phillbush Wrote:
(18-06-2020, 04:15 PM)zge Wrote: On the topic of shells, does anyone know how to get ksh's "horizontal line scrolling" feature in bash? That's really the only thing (except maybe for the cleanness of ksh) that I notice and prefer over bash. I keep on using bash because of it's superior auto-completion, though.

Put the following in your ~/.inputrc
Code:
set horizontal-scroll-mode on

For some reason that didn't work on my system, but

Code:
set horizontal-scroll-mode On

did. Not as nice as ksh, but it works well.
phillbush
(08-07-2020, 08:16 AM)zge Wrote: For some reason that didn't work on my system, but

set horizontal-scroll-mode On

did. Not as nice as ksh, but it works well.

That's strange, the manual says:

Quote:Unrecognized variable names are ignored. When a variable value is read, empty or null values, "on" (case-insensitive), and "1" are equivalent to On. All other values are equivalent to Off.

Anyways...
One thing (other than <(command)) that makes me like bash more than ksh is that in ksh you can only rebind the keys in the emacs mode, you cannot rebind keys in the vi mode, while in bash you can rebind in both modes. Line editing in bash is much more involved.

That makes me think that shells should not be interactive, instead we should use a wrapper like rlwrap that does the interactive job of line editing and completion, leaving the command parsing and execution job for the shell itself. Thus, you could reuse the shell wrapper in other shells/prompts like debuggers and interpreters, and have a uniform interface for every shell. You could for example, use sh, plan9's rc and a lisp interpreter all with the same line editing keybindings.
jkl
Don’t they all use readline anyway?

edit:
Elsewhere on the internet, someone has published the desh, an extension of a feature branch of the es (which is, as you know, basically a more flexible rc), featuring a custom readline replacement named "linecook", so I stand corrected.




Members  |  Stats  |  Night Mode