To find text/pattern in a sub-directory tree using grep:
grep -rlw "thing" sub/dir
| // Copy.js | |
| module.exports = () => { | |
| keyboard.pressKey(Key.LeftSuper, Key.C); | |
| keyboard.releaseKey(Key.LeftSuper, Key.C); | |
| }; | |
| // Paste.js | |
| module.exports = () => { | |
| keyboard.pressKey(Key.LeftSuper, Key.V); | |
| keyboard.releaseKey(Key.LeftSuper, Key.V); |
| # Setup a fresh macOS system | |
| # install homebrew | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)” | |
| # install iTerm2 | |
| brew install iterm2 | |
| # install zsh | |
| brew install zsh |
| var allowPaste = function(e) { | |
| e.stopImmediatePropagation(); | |
| console.log("Free the paste!") | |
| return true; | |
| }; | |
| document.addEventListener('paste', allowPaste, true); |
To find text/pattern in a sub-directory tree using grep:
grep -rlw "thing" sub/dir
| # Ctrl+Left/Right to move by whole words | |
| "\e[1;5D": backward-word | |
| "\e[1;5C": forward-word | |
| # Ctrl+Backspace/Delete to delete whole words | |
| "\d": backward-kill-word | |
| "\e[3;5~": kill-word | |
| # Ctrl+Shift+Backspace/Delete to delete to start/end of the line | |
| "\e\d": backward-kill-line |