News for hackers. Stuff that matters.
Re:Ask HN: How should the CLI be designed today? by 0x37 on Saturday July 16, 2016 @04:05PM (#12107672)
If we could start with having working ctrl-c ctrl-v that would be great :). (I know Windows improved on this with 10 but Linux is still lacking)

Other than that I wouldn't mind some graphical features, such as being able to display thumbnails of images for example.

Re:Ask HN: How should the CLI be designed today? by tokenizerrr on Saturday July 16, 2016 @04:17PM (#12107732)
On Linux I usually use Ctrl+Shift+C, Ctrl+Shift+V which seems to be bound by default on most terminals. Ctrl+C of course terminates the running program, usually.
Re:Ask HN: How should the CLI be designed today? by skykooler on Saturday July 16, 2016 @04:28PM (#12107768)
Why is ctrl-C the shortcut for "terminate", anyway? I would have expected it to be something like ctrl-T.
Re:Ask HN: How should the CLI be designed today? by jaredsohn on Saturday July 16, 2016 @04:41PM (#12107811)
from wikipedia (https://en.wikipedia.org/wiki/Control-C):

As many keyboards and computer terminals once directly generated ASCII code, the choice of control-C overlapped with the ASCII end-of-text character. This character has a numerical value of three, as "C" is the third letter of the alphabet. It was chosen to cause an interrupt as it is otherwise unlikely to be part of a program's interactive interface. Many other control codes, such as control-D for the end-of-transmission character, do not generate signals and are occasionally used to control a program.

Also see https://en.wikipedia.org/wiki/C0_and_C1_control_codes#STX

Re:Ask HN: How should the CLI be designed today? by Symbiote on Saturday July 16, 2016 @04:47PM (#12107834)
Type

   man ascii
and notice what is 0x40 less than the capital letter.

H is 0x48, backspace is 0x08. ^H is the same as backspace.

I is 0x49, tab is 0x09, ^I is the tab sequence.

Now you know why Windows \r in text file show up as ^M in vi and Emacs.

^D is ASCII 0x04, "EOT (end of transmission)". That's why you use that to end input.

^C is ASCII 0x03, whose name is "ETX (end of text)". That seems a reasonable choice.

Re:Ask HN: How should the CLI be designed today? by Symbiote on Saturday July 16, 2016 @04:13PM (#12107710)
You can probably map Super+C and Super+V (i.e. the "Windows Key") to copy and paste in your chosen terminal emulator.

(I have done this in KDE's Konsole, so I can paste from a web form I must often use, which somehow blocks the standard Unix/Linux selecting-to-copy, middle-click-to-paste method.)

Re:Ask HN: How should the CLI be designed today? by arm on Saturday July 16, 2016 @04:36PM (#12107789)
This is probably one of the biggest advantages of macOS using ⌘C and ⌘V for copying and pasting instead of Ctrl-C and Ctrl-V.

(…well that, and being able to use your thumb for performing the keyboard shortcut instead of having to use your pinky finger).

Re:Ask HN: How should the CLI be designed today? by 8f3385e9ad93ba0 on Sunday July 17, 2016 @08:05AM (#12109906)
In Linux there's no need to Ctrl-v---just make the selection---, and Ctrl-c is instead Shift-Insert. How is that lacking; it saves 2 keystrokes?
Re:Ask HN: How should the CLI be designed today? by douche on Sunday July 17, 2016 @10:06AM (#12110199)
The insert key is located in incredibly non-standard and inconvenient positions on many keyboards. For instance, right now I'd have to hold down a special mode-shift key, shift, and then find the insert key, which I don't believe I have ever typed on purpose in my life - it basically exists as a huge PITA, like the Caps-Lock key, that occasionally puts me into overwrite mode or does other things I didn't intend when I fat-finger it.
Re:Ask HN: How should the CLI be designed today? by pritambaral on Saturday July 16, 2016 @05:21PM (#12107919)
> Linux is still lacking

Linux isn't lacking it. It just has already decided on a specific shortcut. Do you also consider the absence of Ctrl-C to paste in Safari (in favour of Cmd-C) a lack?

At least on Linux terminal emulators you could always remap it (at your own peril, be careful about setting up another shortcut for the actual interrupt). Pre-Windows 10, OTOH...