Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test #1

Merged
merged 3 commits into from Sep 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions extras/WSL.zsh-theme
@@ -0,0 +1,30 @@
# ZSH Theme - WSL
# Author: Patrick Wu <wotingwu@live.com>
# Theme based on my theme linuxer-min and mh Theme

# Current Dir Shortener
local current_dir=' %{$fg[magenta]%}%14<...<%~%<<%{$reset_color%} '

# Git info
local git_info='$(git_prompt_info)%'
ZSH_THEME_GIT_PROMPT_PREFIX="[%{$fg[cyan]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]"
ZSH_THEME_GIT_PROMPT_DIRTY=":%{$fg[red]%}x"
ZSH_THEME_GIT_PROMPT_CLEAN=":%{$fg[green]%}o"

# NVM info
local nvm_info='$(nvm_prompt_info)'
ZSH_THEME_NVM_PROMPT_PREFIX="%{$fg[green]%}["
ZSH_THEME_NVM_PROMPT_SUFFIX="]%{$reset_color%}"

# RVM info
local rvm_info='$(rvm_prompt_info)'
ZSH_THEME_RVM_PROMPT_PREFIX="%[$fg[red]%}["
ZSH_THEME_RVM_PROMPT_SUFFIX="]%{$reset_color%}"


local exit_code="%(?,,[%{$fg[red]%}%B%?%b%{$reset_color%}])"
local build="%{$fg[cyan]%}[`reg.exe query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v "CurrentBuild" 2>&1 | egrep -o '([0-9]{5})'`]%{$reset_color%}"
#PROMPT="${build}${nvm_info}${rvm_info}${current_dir}%# "
PROMPT="${build}${nvm_info}${rvm_info}${git_info}${current_dir}%# "
RPROMPT="${exit_code}"
2 changes: 1 addition & 1 deletion wslfetch
Expand Up @@ -14,7 +14,7 @@ is_line=0
is_splash=0
. wslu --silent

help_short="wslfetch (-h|-v|-s|-l)"
help_short="wslfetch (-h|-v|-s|-l|-c)"

hostname="$(hostname)"
branch=`wslsys -b -s`
Expand Down
7 changes: 3 additions & 4 deletions wslpkg
Expand Up @@ -22,10 +22,9 @@ apath_win=`wslpath -d -A`
apath_linux=`wslpath -u -A`
ppath_win=`wslpath -d -P`
spath_win=`wslpath -d -su`

if [[ -f /etc/SuSE-release ]]; then
echo "${error}wslpkg currently do not support openSUSE. Exited"
exit 40
if [[ $distro == "opensuse" ]] || [[$distro == "sles" ]]; then
echo "${warn} Unsupported Distros. Please use ubuntu for this utility. Exiting."
exit 1
fi
case $1 in
-h|--help) help $0 "$help_short"; exit;;
Expand Down