Enable up-arrow history auto-complete
This is really simple:
nano ~/.inputrc
Paste in:
"\e[A": history-search-backward
"\e[B": history-search-forward
Run:
bind -f ~/.inputrc
This is really simple:
nano ~/.inputrc
Paste in:
"\e[A": history-search-backward
"\e[B": history-search-forward
Run:
bind -f ~/.inputrc
To run cron jobs with your user env so that it's actually possible for them to run anything, add this to the top of your cron file (edit with crontab -e
):
SHELL=/bin/bash
HOME=/home/<username>
BASH_ENV=$HOME/.bashrc
Then look at your ~/.bashrc
file and make sure to remove any code (usually at the top) that exits early if found in a non-interactive shell.
The tools we use as developers make us more effective (or at least hopefully faster) developers. So why not spend some time to make one of the most common dev tools much more useful? Here's a way to give any terminal app a personalized and awesome experience (fwiw I use the default app included with macOS). Features covered will be the following:
A simple script:
grep -rl '<search-string>' <search/dir> | xargs code -r
Between two different directories:
cd <first-path> && grep -rl '<search-string>' <search/dir> | (cd <second-path>; xargs code -r)
ffmpeg -i video.mp4 -c:v libvpx -crf 30 -b:v 0 -c:a libvorbis video.webm