Skip to content

Zsh

Useful commands

  • Ctrl+X Ctrl+E: drop the current command into your $EDITOR
  • ls -<tab>: get help for a specific command
  • cd -<tab>: go back to previous paths

Colors

red() { echo -e "\033[00;31m$1\033[0m"; }
green() { echo -e "\033[00;32m$1\033[0m"; }
yellow() { echo -e "\033[00;33m$1\033[0m"; }
blue() { echo -e "\033[00;34m$1\033[0m"; }

Default arguments

my_func() { echo "${1-'default'}" }
 ```

## Useful commands

Diff two files

```bash
sdiff -l file1 file2 | cat -n | grep -v -e '($'