We can cut and paste current line in bash with ctl+u and ctl+y
But I have read here that bash doesn't have clipboard concept, so how those shortkeys working?
(or in another way: what they doing?)
We can cut and paste current line in bash with ctl+u and ctl+y
But I have read here that bash doesn't have clipboard concept, so how those shortkeys working?
(or in another way: what they doing?)
Killing and yanking text are readline features. bash normally uses readline but you could argue that it is not really a part of bash.
You can test that with
bash --noediting
If you are using bash in a terminal under X11 (most people are), then you can do cut and paste with the mouse, no keys required.
Left click and drag to highlight. This puts the highlighted text into the X11 primary selection.
To paste the primary selection, put the cursor in the target window and center-click the mouse.
You can interact with the selections on the command line using xsel.