Copy-paste in the shell
Is there a way to configure the shell window to copy-paste selected text to the clipboard using the mouse buttons or keyboard shortcuts?
Is there a difference if i am running KDE/Gnome or the type of shell (sh, tsh, csh ...)? |
You can highlight text in a terminal and the right click it to select copy. The text can be pasted anywhere later on.
|
I think that the normal ctrl-X,C,V routine is not used in the shell terminals because it would conflict with some bash and/or editor commands.
As a side note, I have found that "right-click" is more often than not a real power tool. I have learned to try it before anything else. |
Yeah that is true, you highlight the text and right click,
there is also another way as well, lets say you closed the shell and then came back the next day opened up the shell and didnt remember what you typed. All you have to do is press the up or down key and you will see the different lines of code that you have ever put on there. Obviously the things from the day before will be first etc. then once you see the line of text that you want just left click and it will be typed on there for you. you can also use this method whenever you want to run a command many times and dont want to waste your time cutting and pasting. |
Quote:
|
Click your wheel button.
|
Quote:
[edit] After reading post #8, I think that you probably were refering to the dos-prompt. So consider above comment as not written. [/edit] It might depend on the graphical environment that you're using, but in Ubuntu (Gnome) and Xubuntu (XFCE), <ctrl><shift>C and <ctrl><shift>V are the shortcuts for copying and pasting in a terminal (check the menus). |
zvirack,
I am not here to defend Linux but on a level playing field the equivalent shell in Windows is the command prompt. you can't even use the mouse there, let alone copy and paste! If you want to enjoy the ease and facilities available in a graphic desktop you don't go into a shell to get them! These direction keys and mouse right right clicking business are the common standard with which you can survive from operating system to operating system. If you don't like it then you are better off sticking with the system that gives you the ease you want. If you think life is tough in a bash shell you should try the csh, tcsh or ksh shell for a change. |
Quote:
|
Wim Sturkenboom,
Same time I wrote the reply. I run a XP on another PC to check it out for sure. I can close the command prompt box with a mouse but not highlighting the text to do copy+paste. You can copy things outside and paste in the command prompt but not take anything out apparently. I later checked with Vista. Same applies. You seem to think otherwise. What version of Windows are you using? |
You can. From the 'menu' (<alt><space>) -> edit -> mark. Highlight with mouse and press <enter> to copy to clipboard.
Verified on old W98SE machine how it had to be done exactly. Works in Win2K (for sure) and WinXP (why not) as well; both not at hand. |
Wim Sturkenboom,
Yes you are right. It is hidden inside the top left icon in Vista. The mouse can be used to mark and paste text in MS Windows command prompt. It works in graphic border as well because one can copy one character wide vertical column in the display whereas in a bash shell the full line horizontally is always copied Learn a new thing today. |
All times are GMT -5. The time now is 09:12 PM. |