Update 23-01-2020

This commit is contained in:
2020-01-25 06:47:22 +01:00
parent 1f6b5d13d8
commit f760227ba1
28 changed files with 1864 additions and 57 deletions

View File

@@ -0,0 +1,66 @@
# Terminal
##### Ouvrir une page man dans un fenêtre spécifique:
```bash
$ open x-man-page://ls
# fonction:
function xmanpage() { open x-man-page://$@ ; }
```
##### Ouvrir une page man dans Aperçu:
```bash
$ man -t ls | open -f -a "Preview"
# fonction:
function preman() { man -t "$@" | open -f -a "Preview" ;}
```
##### Obtenir le chemin de la fenêtre courante du Finder:
```bash
$ osascript -e 'tell app "Finder" to get posix path of ((target of window 1) as alias)'
/Users/bruno/.kymsu/plugins.d/
```
```bash
# fonction:
# prints the path of the front Finder window. Desktop if no window open
function pwdf () {
osascript <<EOS
tell application "Finder"
if (count of Finder windows) is 0 then
set dir to (desktop as alias)
else
set dir to ((target of Finder window 1) as alias)
end if
return POSIX path of dir
end tell
EOS
}
# changes directory to frontmost Finder window
alias cdf='pwdf; cd "$(pwdf)"'
```
#### Raccourcis:
Aller en début de ligne: `CTRL+A`
Aller en fin de ligne: `CTRL+E`
Déplacer le curseur: `OPTION+clic`
Supprimer du curseur jusqu'à la fin de ligne: `CTRL+K`
Coller les texte supprimer: `CTRL+Y`
Supprimer le mot précédent: `CTRL+W`
Rechercher dans l'historique: `CTRL+R`