diff --git a/.subbash/export b/.subbash/export index d9f8137..bc35a30 100644 --- a/.subbash/export +++ b/.subbash/export @@ -1,4 +1,6 @@ -export EDITOR=vim + + +export EDITOR="/usr/bin/env vim" export HISTSIZE=10000 export HISTFILESIZE=10000 diff --git a/.subbash/functions b/.subbash/functions index 036a810..d29d738 100644 --- a/.subbash/functions +++ b/.subbash/functions @@ -91,3 +91,14 @@ extract () { mcd () { mkdir -p "$1" && cd "$1" || return } + + +# Syntax-highlight JSON strings or files +# Usage: `json '{"foo":42}'` or `echo '{"foo":42}' | json` +json() { + if [ -t 0 ]; then # argument + python -m json.tool <<< "$*" | pygmentize -l javascript + else # pipe + python -m json.tool | pygmentize -l javascript + fi +} diff --git a/.subbash/prompt b/.subbash/prompt index 128d148..43060a6 100644 --- a/.subbash/prompt +++ b/.subbash/prompt @@ -84,7 +84,7 @@ __prompt_command() { TERMINAL_NAME=${0%%/*} TERMINAL_NAME="\[\e]2;${TERMINAL_NAME^^}\a\]" - if [ $EXIT != 0 ]; then + if [ "$EXIT" != 0 ]; then PS1="$TERMINAL_NAME\n$prompt_color┌─${VENV_}─($close_color$info_color\u$prompt_symbol\H$close_color$prompt_color)-[$close_color\w$prompt_color]$close_color $red_color${BRANCH_}$close_color\n\[$(tput sc; rightprompt $EXIT; tput rc)\]$prompt_color└─$close_color$info_color$end_symbol$close_color " else PS1="$TERMINAL_NAME\n$prompt_color┌─${VENV_}─($close_color$info_color\u$prompt_symbol\H$close_color$prompt_color)-[$close_color\w$prompt_color]$close_color $red_color${BRANCH_}$close_color\n$prompt_color└─$close_color$info_color$end_symbol$close_color " diff --git a/README.md b/README.md index 4c41875..d6db6aa 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -
@@ -13,7 +13,7 @@
## Content
* [Project description](#chapter-0)
* [Installation](#chapter-1)
-* [Tips](#chapter-2)
+* [Docs](#chapter-2)
@@ -35,25 +35,15 @@ dotfiles/setup.sh
. ~/.bashrc
```
-
-## Tips
+## Docs
+* [Tips](doc/tips.md)
+* [Cron](doc/cron.md)
+* [GPG](doc/gpg.md)
+* [SSH](doc/ssh.md)
+* [Vim](doc/vim.md)
-```$RANDOM``` - Return random 0-32767\
-```\command``` - Without using alias
-
-
-
-### Autostart
-* create ```/etc/systemd/system/