Cut and Paste in Terminal
Posted
#1
(In Topic #146)
Guru

Posted
Regular

Maybe using the "Clipboard" function…
Type "cli"… then a popup should open in the help…
Have a nice day.
Posted
Guru

Posted
Regular

Yes, I misunderstood your question.
In fact you would like to retrieve what is highlighted in the end part (and only this?).
Maybe a start to the track…
When you type 1 command, it starts with "#" and each answer is separated by "\n".
When you type 2 commands, they are separated by a "#" and the internal answers are also separated by a "\n".
All of this is visible in the text property.
Maybe a split might be suitable for temporary use?
Here is an example when I type probepart and probedisk commands.
Of course it is easier for me to type these commands in "shell" and get the result in a variable…
It all depends on what you want to do…
Code
"# probepart\n/dev/sda1|ext3|109373440\n/dev/sda5|swap|7852032\n# probedisk\n/dev/sda|drive|ATA ST96812AS \n/dev/sr0|optical|TSSTcorpDVD+-RW \nTS-U633F\n# "
Posted
Guru

Posted
Regular

In the "Public Sub TerminalMenu_Click ()",
you have to declare "sline" and she's the one who will retrieve the contents of "TerminalView1. Text"
Code (gambas)
- sline = TerminalView1.Text
- Print sline
- ' Select Case Last.Name
- ' Case "MenuPaste"
- ' 'TerminalView1.Input = Clipboard.Paste
- ' Case "MenuCopy"
- ' Clipboard.Copy(TerminalView1.Text) ''Copys ALL the text in Terminal without the need to highlight?
- ' End Select
Or look in the console…
Have a nice day.
Posted
Regular

Posted
Guru

Thanks for all the input.
Code (gambas)
Posted
Regular

Simple and effective solution.
Thank you and congratulations to you both.
Have a nice day.
Posted
Guru

Posted
Regular

I just tried EasyTerminal 0.0.1.
As you know I work with distributions where the user is declared root (tooppy, tahr, tritone etc.).
So commands like "sudo" doesn't exist and the working / backup directory is root which is normally inaccessible under distributions like mint, debian etc..
During the 1st launch of EasyTerminal, there is an error on line 44. "The file or directory does not exist".
It's actually ". bash_history".
So I created an empty file in root that I named. bash_history then restarted EasyTerminal.
There, the browser (chromium) opened more than 50 tabs most of them on various empty pages or pointing to dead links and some to "man pages" and all in English (while there are "man pages" in French).
Finally EasyTerminal seems to be stuck at the line
362 File. Save (sFolder &/ LCase (sChar) & ". csv", sSpeedSave. Join (gb. newline))
with the message "The directory or file does not exist". A. csv file seems to be missing. I didn't go any further in my investigations.
Is there a specific name to give to the. csv file?
Have a nice day.
Translated with www.DeepL.com/Translator
Posted
Guru

Thanks for trying the program. I think most Distributions have a Home folder and run in a protected mode and not in root. I have tried in the past to load ToOpPy but I ran into all sorts of problems.
'sudo' should not have been a problem as I didn't use it. The program tries to make a folder in the Home folder, which I presume does not exist in your case, and store the list of commands for faster retrieval. The folder will contain a .csv file for each of the buttons '0.csv' and 'a.csv' to 'z.csv'.
'.bash_history' is the file that in Ubuntu, Mint, Debian etc. that stores the commands you use in Terminal. It would seem that ToOpPy does not use Bash as a Terminal.
Can you try the program in Mint, I know you have used Mint before.
Salut Didier,
Merci d'avoir essayé le programme. Je pense que la plupart des distributions ont un dossier Home et s'exécutent en mode protégé et non pas en root. J'ai essayé dans le passé de charger ToOpPy mais j'ai rencontré toutes sortes de problèmes.
sudo "n'aurait pas dû être un problème car je ne l'ai pas utilisé. Le programme essaie de faire un dossier dans le dossier Home, qui n'existe pas dans votre cas, je présume, et stocke la liste des commandes pour une récupération plus rapide. Le dossier contiendra un fichier. csv pour chacun des boutons' 0. csv'et' a. csv' à' z. csv'.
. bash_history'est le fichier qui stocke dans Ubuntu, Mint, Debian, etc. les commandes que vous utilisez dans Terminal. Il semblerait que ToOpPy n'utilise pas Bash comme Terminal.
Pouvez-vous essayer le programme dans Mint, je sais que vous avez déjà utilisé Mint avant.
Posted
Regular

Hello Cogier
I've just tried under mint, if the. Bash_History file is created automatically, the program still locks to line 362 with the same message as before. Another difference is that the tabs do not open in "firefox", but you can see the numbers increasing on the first button.
Since this is an external hard drive that I use for testing, it is possible that mint or gambas3_3.10.0 may fail…
What is the command to type in terminal to know the version of bash? I could try under tooppy to get the information back to you.
Indeed the French translation may interest other users of the site, I attach the original text.
Have a nice day.
Translated with www.DeepL.com/Translator
—fr—
Bonjour Cogier
Je viens d'essayer sous mint, si le fichier .Bash_History est bien créé automatiquement, le programme se bloque malgré tout à la ligne 362 avec le même message que précédemment. Autre différence, les onglets ne s'ouvrent pas dans "firefox", mais on peut voir les chiffres augmenter sur le premier bouton.
S'agissant d'un disque dur externe que j'utilise pour des essais, il est possible que mint ou gambas3_3.10.0 soient défaillant…
Quelle est la commande à taper en terminal pour connaitre la version de bash ? Je pourrait essayer sous tooppy pour te retourner l'information.
Effectivement la traduction Française peut intéresser d'autres utilisateurs du site, je joint le texte original.
Bonne journée.
Posted
Guru

A good example of changing something and breaking it!!
Move line 54 'If Not Exist(sFolder) Then Mkdir sFolder' to line 43, just before 'Me.Show'
Salut Didier,
Un bon exemple de changement et de rupture!!
Déplacez la ligne 54'If Not Exist(sFolder) Then Mkdir sFolder' à la ligne 43, juste avant'Me. Show'.
Traduit avec www.DeepL.com/Translator
Posted
Regular

Hello Cogier
Ok after line reversal, easyterminal works.
One regret, the man pages are all in English, is there a way to select only French pages?
Is there a French translation of easyterminal (otherwise I can try to do it)?
How to add commands that do not exist under mint but are found under the different puppy's, such as probedisk and probepart?
Have a nice day.
Translated with www.DeepL.com/Translator
—fr—
Bonjour Cogier
Ok après l'inversion de ligne, easyterminal fonctionne.
- Un regret, les man pages sont toutes en Anglais, y a-t-il un moyen pour ne sélectionner que les pages Française de préférence ?
- Est-il prévu une traduction Française de easyterminal (sinon je peux essayer de le faire) ?
- Comment ajouter des commandes qui n'existe pas sous mint mais que l'on trouve sous les différentes puppy's, comme par exemple probedisk et probepart ?
Bonne journée.
Posted
Guru

Thanks for the feedback: -
In MintOne regret, the man pages are all in English, is there a way to select only French pages?
Code
sudo apt-get install manpages-fr manpages-fr-extraLet me get some bugs sorted and then I will ask for your help.Is there a French translation of easyterminal (otherwise I can try to do it)?
It seems that these two commands are unique to Puppy Linux. I can't find what they do but I expect that there are other commands in Mint that will do a similar job.How to add commands that do not exist under mint but are found under the different puppy's, such as probedisk and probepart?
Salut Didier,
Merci pour le feedback: -
Dans MintUn regret, les pages de manuel sont toutes en anglais, y a-t-il un moyen de ne sélectionner que des pages en français?
Code
sudo apt-get install manpages-fr manpages-frLaissez-moi régler quelques bugs et je vous demanderai votre aide.Est-ce qu'il y a une traduction française de easyterminal (sinon je peux essayer de le faire)?
Il semble que ces deux commandes sont uniques à Puppy Linux. Je ne peux pas trouver ce qu'ils font, mais je m'attends à ce qu'il y ait d'autres commandes dans Mint qui feront un travail similaire.Comment ajouter des commandes qui n'existent pas sous menthe mais qui se trouvent sous les différents chiots, comme probedisk et probepart?
Traduit avec www.DeepL.com/Translator
1 guest and 0 members have just viewed this.





