Using Shortkeys in linux (my everyday List)

If it doesn't relate to Debian, but you still want to share it, please do it here

Re: Using Shortkeys in linux (my everyday List)

Postby Head_on_a_Stick » 2020-06-05 21:25

LE_746F6D617A7A69 wrote:ksh and many other shells are mostly dead projects (f.e. the last commit in ksh was in 2012, and it's not actively developed since that time)

Erm, no. The original ksh93 was revived by AT&T a few years ago and Debian now package the new "2020" version in sid: https://packages.debian.org/sid/ksh

There is also the MirBSD KornShell, which is the stock shell for Android and so has more users than bash: http://www.mirbsd.org/mksh.htm ← last commit 20 days ago.

And don't forget OpenBSD's ksh(1) :)

LE_746F6D617A7A69 wrote:this has nothing to do with "clear specification"

No, KornShell has nothing to do with the POSIX sh specification, which is what I was talking about...

LE_746F6D617A7A69 wrote:If "bashisms" means using bash-specific features, then we have also "dashism" and "kashism" for ksh - all those shells have specific features or parameters which are breaking portability of scripts.

Yes and that's exactly my point — if the POSIX sh specification is followed and a /bin/sh shebang employed then scripts will be portable between distributions and operating systems.

LE_746F6D617A7A69 wrote:I'm using Bash for running quite complex scripts, and I haven't found any bugs - if You can prove Your claim, You should file a bug report.

No need for that, Debian already has over 200 active bug reports: https://bugs.debian.org/cgi-bin/pkgrepo ... t=unstable

And even the man page admits to it's failings:
bash(1) wrote:BUGS

It's too big and too slow.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12650
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Using Shortkeys in linux (my everyday List)

Postby LE_746F6D617A7A69 » 2020-06-06 07:24

Head_on_a_Stick wrote:
LE_746F6D617A7A69 wrote:ksh and many other shells are mostly dead projects (f.e. the last commit in ksh was in 2012, and it's not actively developed since that time)

Erm, no. The original ksh93 was revived by AT&T a few years ago and Debian now package the new "2020" version in sid: https://packages.debian.or/sid/ksh

There is also the MirBSD KornShell, which is the stock shell for Android and so has more users than bash: http://www.mirbsd.org/mksh.htm ← last commit 20 days ago.

Debian has both pdksh (aka ksh93) and mksh (MirBSD Korn Shell), and You're right: mksh is still developed, (EDIT: but pdksh is dead)
EDIT2: I've downloaded the sources for ksh 2020 version, and in the changelog there's a list of "Notable non-backward compatible changes" - that list is quite long... ;) /EDIT

It's not clear for Me, what do You mean by saying that mksh has more users - is it because there are more Android-based devices than Debian-based - or what? :)

Head_on_a_Stick wrote:(...) if the POSIX sh specification is followed and a /bin/sh shebang employed then scripts will be portable between distributions and operating systems.

Not really - in most cases scripts are used to automate OS-specific tasks. Even if You will use 100% POSIX compatible shell, the scripts are still non-portable.

Example: here I'm using a trivial shell script, which is switching performance modes on my GFX card - this script is 100% POSIX-compatible, and 100% non-portable to other OS-es -> it requires specific kernel, gfx driver and a helper application.

So, for scripts that are OS-specific it makes no sense to use POSIX standard - such scripts should be written for default OS shell (using its specific features if needed)

Head_on_a_Stick wrote:And even the man page admits to it's failings:
bash(1) wrote:BUGS

It's too big and too slow.
:lol: Yeah, I know that...
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 390
Joined: 2020-05-03 14:16

Re: Using Shortkeys in linux (my everyday List)

Postby Head_on_a_Stick » 2020-06-06 10:12

LE_746F6D617A7A69 wrote:Debian has both pdksh (aka ksh93) and mksh (MirBSD Korn Shell), and You're right: mksh is still developed, (EDIT: but pdksh is dead)

ksh93 is not derived in any way from pdksh, it was originally a proprietary product and pdksh was developed independently because of this. Both mksh and OpenBSD's ksh(1) are derived from pdksh and can be considered the active successors.

LE_746F6D617A7A69 wrote:I've downloaded the sources for ksh 2020 version, and in the changelog there's a list of "Notable non-backward compatible changes"

Kurtis Radar stripped out a lot of David Korn's original code and also moved from AT&T's own build system to Meson. The ksh93 community were appalled by this and eventually persuaded AT&T to transfer krader's version to a separate branch and re-instate the 2012 version of ksh93 to the master. Juicy details here and here. The community is now trying to develop ksh93 themselves here. Debian now also provide a specific ksh93 package in sid: https://packages.debian.org/sid/ksh93 (see https://bugs.debian.org/cgi-bin/bugrepo ... =%23948745 for the details).

LE_746F6D617A7A69 wrote:It's not clear for Me, what do You mean by saying that mksh has more users - is it because there are more Android-based devices than Debian-based - or what?

Yes, there are more Android devices than Debian machines.

Anyway, I think we've hi-jacked the OP's thread quite enough by now. Please open a new thread if you want to continue this discussion.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12650
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Using Shortkeys in linux (my everyday List)

Postby LE_746F6D617A7A69 » 2020-06-06 14:11

Head_on_a_Stick wrote:Anyway, I think we've hi-jacked the OP's thread quite enough by now.
Yes, I agree.
---------------------------------------------------------------------------------------------------
So, let's get back to the topic:
RU55EL wrote:I would venture to say: If you don't use the command line, you don't effectively use Debian. Of course, there are short cut keys for the command line

I use the default shortcut keys. Which cover just about everything that I like to use. Granted, I can think of a couple that I wouldn't mind adding. But, I have never taken the time to create bash scripts to do so. I just set them up in GNOME settings, under devices: keyboard: shortcuts.

Same here, but I use XFCE exclusively.

One remark: the howto from your link is a little bit incomplete, because there are also other very convenient shortcuts available for the terminal, f.e:
Arrow<Up/Down> : an alias for Ctrl-<P/N>, view previous/next command from the history
Alt+Backspace : delete word to the left, just like Ctrl-W
Ctrl-G : cancel searching historical commands, used with Ctrl-R (very useful in some cases)
and the most "powerful" pair:
Shift-Ctrl-V : paste text into the terminal at current cursor position
Shift-Ctrl-C : copy selected text from the terminal window

Besides that, I'm using 2 non-default shortcuts:
Ctrl-Alt-T: launch the terminal under mouse pointer
Ctrl-Alt-Shift-Arrow<Left/Right/Up/Down> - move active window to a neighbouring workspace (Ctrl-Alt-Arrow<Left/Right/Up/Down> is just switching the workspaces)

Regards.
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 390
Joined: 2020-05-03 14:16

Previous

Return to Offtopic

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable