The terminal command palette. Contribute to pindexis/marker development by creating an account on GitHub.
Et pour être root :
docker exec -it --user root
Liste des raccourcis Bash
Command Editing Shortcuts
Ctrl + a – go to the start of the command line
Ctrl + e – go to the end of the command line
Ctrl + k – delete from cursor to the end of the command line
Ctrl + u – delete from cursor to the start of the command line
Ctrl + w – delete from cursor to start of word (i.e. delete backwards one word)
Ctrl + y – paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor
Ctrl + xx – move between start of command line and current cursor position (and back again)
Alt + b – move backward one word (or go to start of word the cursor is currently on)
Alt + f – move forward one word (or go to end of word the cursor is currently on)
Alt + d – delete to end of word starting at cursor (whole word if cursor is at the beginning of word)
Alt + c – capitalize to end of word starting at cursor (whole word if cursor is at the beginning of word)
Alt + u – make uppercase from cursor to end of word
Alt + l – make lowercase from cursor to end of word
Alt + t – swap current word with previous
Ctrl + f – move forward one character
Ctrl + b – move backward one character
Ctrl + d – delete character under the cursor
Ctrl + h – delete character before the cursor
Ctrl + t – swap character under cursor with the previous one
Command Recall Shortcuts
Ctrl + r – search the history backwards
Ctrl + g – escape from history searching mode
Ctrl + p – previous command in history (i.e. walk back through the command history)
Ctrl + n – next command in history (i.e. walk forward through the command history)
Alt + . – use the last word of the previous command
Command Control Shortcuts
Ctrl + l – clear the screen
Ctrl + s – stops the output to the screen (for long running verbose command)
Ctrl + q – allow output to the screen (if previously stopped using command above)
Ctrl + c – terminate the command
Ctrl + z – suspend/stop the command
Bash Bang (!) Commands
Bash also has some handy features that use the ! (bang) to allow you to do some funky stuff with bash commands.
!! – run last command
!blah – run the most recent command that starts with ‘blah’ (e.g. !ls)
!blah:p – print out the command that !blah would run (also adds it as the latest command in the command history)
!$ – the last word of the previous command (same as Alt + .)
!$:p – print out the word that !$ would substitute
!* – the previous command except for the last word (e.g. if you type ‘find some_file.txt /‘, then !* would give you ‘find some_file.txt‘)
!*:p – print out what !* would substitute
Bash alias does not directly accept parameters. You will have to create a function and alias that.
alias does not accept parameters but a function can be called just like an alias.
For example:
myfunction() {
#do things with parameters like $1 such as
mv "$1" "$1.bak"
cp "$2" "$1"
}myFunction xyz #calls
myfunction
By the way, Bash functions defined in your .bashrc and other files are available as commands within your shell. So for instance you can call the earlier function like this
$ myfunction original.conf my.conf
docker run -a stdin -a stdout -i -t debian-sshd /bin/bash
une petite documentation sur les tests dans un script shell
Pas mal pour générer un PS1 sympa.
moi j'ai pris "rainbow" et je le trouve très beau :x
et j'ai ajouté l'heure.
export PS1="[$(tput bold)][$(tput setaf 6)]\t [$(tput setaf 1)][[$(tput setaf 3)]\u[$(tput setaf 2)]@[$(tput setaf 4)]\h [$(tput setaf 5)]\W[$(tput setaf 1)]][$(tput setaf 7)]\$ [$(tput sgr0)]"
Un très beau prompt pour git.
je n'ai pas réussi à le faire fonctionner sur cygwin pour le moment...
Font pour cygwin : https://github.com/andreberg/Meslo-Font
Et cette ligne la elle marche ?
find . -type f -name "filename_filter" -exec zgrep -h "wanted_str" {} \;
ou celle-ci
find . -type f -name "filename_filter" -exec zcat {} \; | xargs grep -h "wanted_str"
Chez moi la première semble fonctionner...
faire des bash en CGI pour générer du HTML ?
"facile" :x
encore faut il activer CGI... :/
si votre bash est supérieur à 4 (bash --version) :
nohup votre_commande &> nohup.txt &
sinon :
nohup votre_commande 2>&1 > nohup.txt &
et voila ;)
AH!! Voila ce que je cherchais les TAG.
je savais m'en servir... mais je n'étais plus sur...
très utile quand un programme ne prend ses instructions QUE par le stdin ;)
Un bon article de blog qui donne les astuces sur BASH notamment la recherche avec Ctrl+R ;)
Comment ajouter la completion dans bash sous debian.
apt-get install bash-completion
pratique apt-g[TAB] ecrira apt-get dans la console :)