From 820ebeaa5a157836d714e462c7e6e70420fc2646 Mon Sep 17 00:00:00 2001 From: Ambrose Chua Date: Mon, 2 Apr 2018 23:05:10 +0800 Subject: [PATCH] Add thefuck --- .dockerfile | 1 + .drone.yml | 6 ++++++ .install/{zsh-pure.sh => pure.sh} | 2 +- .install/thefuck.sh | 20 ++++++++++++++++++++ .zshrc | 3 +++ 5 files changed, 31 insertions(+), 1 deletion(-) rename .install/{zsh-pure.sh => pure.sh} (89%) create mode 100755 .install/thefuck.sh diff --git a/.dockerfile b/.dockerfile index 6f9fcbd..c6ee11f 100644 --- a/.dockerfile +++ b/.dockerfile @@ -20,6 +20,7 @@ RUN ./.install/zsh.sh RUN ./.install/neovim.sh # shell config, env manager RUN ./.install/zsh-pure.sh +RUN ./.install/thefuck.sh RUN ./.install/yadm.sh # languages RUN ./.install/golang.sh diff --git a/.drone.yml b/.drone.yml index 4088f67..c06565e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -17,6 +17,12 @@ pipeline: - ./.install/neovim.sh - nvim -version - nvim +checkhealth +qa + test-thefuck: + group: test + image: alpine:latest + commands: + - ./.install/thefuck.sh + - thefuck -v test-yadm: group: test image: alpine:latest diff --git a/.install/zsh-pure.sh b/.install/pure.sh similarity index 89% rename from .install/zsh-pure.sh rename to .install/pure.sh index bab451e..7c431b4 100755 --- a/.install/zsh-pure.sh +++ b/.install/pure.sh @@ -4,7 +4,7 @@ set -e source ./.versions echo -echo "Installing pure-prompt for ZSH..." +echo "Installing pure-prompt for zsh..." echo mkdir -p /usr/local/share/zsh/site-functions diff --git a/.install/thefuck.sh b/.install/thefuck.sh new file mode 100755 index 0000000..03f2ad8 --- /dev/null +++ b/.install/thefuck.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e +source ./.versions + +echo +echo "Installing thefuck for zsh..." +echo + +apk add --no-cache --virtual .build-deps \ + build-base \ + python3-dev \ + linux-headers + +apk add --no-cache \ + python3 + +pip3 install thefuck + +apk del .build-deps diff --git a/.zshrc b/.zshrc index 567b05b..2b27ad8 100644 --- a/.zshrc +++ b/.zshrc @@ -21,6 +21,9 @@ setopt extended_glob autoload -U promptinit; promptinit prompt pure +# thefuck +eval $(thefuck --alias nope) + # golang export PATH="$(go env GOPATH)/bin:$PATH"