Skip to content

Instantly share code, notes, and snippets.

View yxliang01's full-sized avatar
🌈
Coding

yxliang yxliang01

🌈
Coding
View GitHub Profile
@yxliang01
yxliang01 / robbyrussell-hostname.zsh-theme
Created August 26, 2017 06:02 — forked from SteelPangolin/robbyrussell-hostname.zsh-theme
Tweak robbyrussell ZSH theme to prepend hostname
local hostname="%{$fg_bold[black]%}%m"
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
PROMPT='${hostname} ${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
@yxliang01
yxliang01 / _tmux_pane_words.zsh
Created January 19, 2018 10:14 — forked from blueyed/_tmux_pane_words.zsh
ZSH configuration to complete words from tmux pane(s)
# Complete words from tmux pane(s) {{{1
# Source: http://blog.plenz.com/2012-01/zsh-complete-words-from-tmux-pane.html
# Gist: https://gist.github.com/blueyed/6856354
_tmux_pane_words() {
local expl
local -a w
if [[ -z "$TMUX_PANE" ]]; then
_message "not running inside tmux!"
return 1
fi
@yxliang01
yxliang01 / vscode-mypy.bash
Created May 29, 2019 21:33
A wrapper for correcting vscode-python extension invokes mypy incorrect problem.
#!/bin/bash
# Author: Xiao Liang <https://github.com/yxliang01>
# Should invoke this in the root package which is also supposed to be the VS Code workspace root
args=( "$@" )
args[-1]=${args[-1]#"$(pwd)/"}
# For debugging