I use the Linux command line extensively, both on my local machine or when I'm connected to a remote server. Používam Linux príkazového riadka vo veľkej miere, a to ako na mojom lokálnom počítači, alebo keď som som pripojený na vzdialený server. There are some keyboard shortcuts that I want to share with you which have made my life on BASH a lot easier. Tam sú niektoré klávesové skratky, ktoré chcem s vami podeliť o ktoré sa môj život v BASH oveľa jednoduchšie. I have not come across too many books that have documented these shortcuts and I think they are quite important to improve your productivity while on the command line. Neprišiel som v príliš veľa kníh, ktoré boli zdokumentované tieto skratky a myslím, že sú veľmi dôležité zlepšiť produktivitu, zatiaľ čo na príkazovom riadku.
1. 1. Ctrl + r Ctrl + R
This keyboard shortcut is for running a reverse search in your command line. Táto klávesová skratka je pre spustenie spätného vyhľadávanie v príkazovom riadku. To use this shortcut hold down the “Control” key in your terminal interface and hit the “r” while the “Control” key is still pressed. Ak chcete použiť tohto zástupcu podržte "Control" kľúč vo vašom termináli rozhranie a stlačte kláves "r", zatiaľ čo "Control" kľúč je stále stlačené. you should get a message like this: , Mali by ste dostať správu, ako je toto:
(reverse-i-search)`': (reverse-i-search) ` ':
Now begin typing a command you used earlier. Teraz začať písať príkaz ste používali predtým. BASH will automatically complete your command. BASH automaticky dokončiť váš príkaz. You can keep hitting the “Ctrl + r” combination to search further. Môžete držať klávesy "Ctrl + R" kombináciu hľadať ďalšie.
2. 2. Ctrl + a Ctrl +
This shortcut makes your cursor jump to the beginning of the line. Táto skratka je kurzor skočí na začiatok riadku. When you have typed a few works in your terminal hit the key combination of “Control + a” and you will reach the beginning of the line you are typing in. Keď ste napísali niekoľko diel v terminálu, stlačíte kombináciu "Ctrl +" a dostanete sa na začiatku riadku píšete palcov
3. 3. Ctrl + e Ctrl + E
This shortcut is similar to the previous one, except it makes your cursor jump to the other end of the line, the end. Táto skratka je podobná predchádzajúcej, až na to, robí váš kurzor skočí na druhý koniec riadku, koniec. Type this key combination when in the middle of a line you are typing and you will jump right to the end of the line. Typ tejto kombinácie kláves, keď v stredu riadku píšete a budete skočiť rovno na koniec riadku.
4. 4. Ctrl + w Ctrl + w
Using this shortcut will result in the deletion of one word to the left of the cursor. Použitie tohto zástupcu bude mať za následok zrušenie jedného slova vľavo od kurzora. So if you are in the middle of a line that you are typing hitting “Control + w” will delete one word before the cursor. Takže ak ste uprostred riadku, ktorý píšete klávesy "Ctrl + w" vymažete jedno slovo pred kurzorom.
5. 5. ESC + d ESC + d
This shortcut is the opposite of the previous one. Táto skratka je opakom predchádzajúceho. Hitting “Escape + d” in your terminal will delete one word to the right of the cursor. Klávesy "Escape + d" v terminálu dôjde k vymazaniu jedného slova vpravo od kurzora.
6. 6. Ctrl + k Ctrl + K
This is a very powerful shortcut and must be used with caution. To je veľmi silný zástupcu a musí byť používaný s opatrnosťou. It deletes all the data to the right of the cursor in the line that you are typing in. To odstráni všetky dáta vpravo od kurzora do riadku, ktorý píšete palcov
7. 7. Ctrl + u Ctrl + U
This is again a very powerful shortcut and must be used with caution. To je opäť veľmi silný zástupcu a musí byť používaný s opatrnosťou. It deletes all the data to the left of the cursor in the line that you are typing in. Remember that once you run this shortcut you can not get back the text that you have typed. Odstráni všetky dáta na naľavo od kurzora v smere, ktorý píšete palcov Nezabudnite, že po spustení tohto zástupcu nemôžete vrátiť text, ktorý ste zadali.























Always appreciate the extra knowledge! Vždy ocenia extra vedomosti! Thanks for sharing! Thanks for sharing!
> Remember that once you run this shortcut you can not get back > Nezabudnite, že po spustení tohto zástupcu nemôžete dostať späť
> the text that you have typed. > Text, ktorý ste zadali.
Not true. Nie je pravda. All the shortcuts you mentioned that remove anything from the command line will place a copy in the kill buffer. Všetky skratky ste sa zmienil, že niečo odstrániť z príkazového riadku sa bude miesto vyhotovenia, v kill buffer. You can yank it from the buffer using CTRL-y Môžete si trhnout z bufferu pomocou CTRL-y
Ya Ben is right. Ya Ben má pravdu. In fact every Emacs users are comfortable with these defaults bash keybindings cause they are often the same as Emacs. V skutočnosti každý Emacs užívatelia sú pohodlné s týmito základnými hodnotami bash klávesových skratiek, ktoré spôsobujú, sú často rovnaké ako Emacs.
I can't understand who could prefer that ^^, but there's also a vi-mode for bash (for readline) : “set -o vi” (”set -o emacs” to get back in the good way :-p). Nechápem, kto by si želalo, aby ^, ale je tu aj vi-mód pre bash (pre readline): "set-o vi" ( "set-o emacs" dostať späť do dobrej ceste:-p) .
As a noob, I appreciate the info Ako noob, oceňujem info