From 0a3911066f412b13d9ef55d57d929ee0fe781cfa Mon Sep 17 00:00:00 2001 From: Aaron Hamilton Date: Thu, 29 Jan 2015 16:03:34 +0000 Subject: [PATCH 1/2] Add nai theme. --- themes/nai/README.md | 10 ++++++++++ themes/nai/fish_prompt.fish | 38 +++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 themes/nai/README.md create mode 100644 themes/nai/fish_prompt.fish diff --git a/themes/nai/README.md b/themes/nai/README.md new file mode 100644 index 0000000..261120f --- /dev/null +++ b/themes/nai/README.md @@ -0,0 +1,10 @@ +## nai +A minimalist fish theme which displays git branch and status information. + + +#### Characteristics + +##### Left Prompt + +* Truncated CWD (just the current folder name) +* Git branch and dirty state (if applicable) \ No newline at end of file diff --git a/themes/nai/fish_prompt.fish b/themes/nai/fish_prompt.fish new file mode 100644 index 0000000..374c2ad --- /dev/null +++ b/themes/nai/fish_prompt.fish @@ -0,0 +1,38 @@ +# name: nai +# Display the following bits on the left: +# * Current directory name +# * Git branch and dirty state (if inside a git repo) + +function _git_branch_name + echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||') +end + +function _git_dirty + echo (command git status -s --ignore-submodules=dirty ^/dev/null) +end + +function fish_prompt + set -l yellow (set_color yellow) + set -l green (set_color green) + set -l normal (set_color normal) + + set -l cwd (basename (prompt_pwd)) + + echo -e "" + + echo -n -s ' ' $cwd $normal + + if [ (_git_branch_name) ] + set -l git_branch (_git_branch_name) + + if [ (_git_dirty) ] + set git_info $yellow $git_branch + else + set git_info $green $git_branch + end + echo -n -s ' ' $git_info $normal + end + + echo -n -s ' ' $normal + +end From 189fd10512dc87fa9683c318f1e7a49900d69191 Mon Sep 17 00:00:00 2001 From: Aaron Hamilton Date: Thu, 29 Jan 2015 16:23:50 +0000 Subject: [PATCH 2/2] Add preview image. --- themes/nai/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/nai/README.md b/themes/nai/README.md index 261120f..4f3f86c 100644 --- a/themes/nai/README.md +++ b/themes/nai/README.md @@ -1,10 +1,11 @@ ## nai A minimalist fish theme which displays git branch and status information. +![nai](https://cloud.githubusercontent.com/assets/1272018/5961225/116d0a7a-a7d3-11e4-88a6-43da003ddc6c.png) #### Characteristics ##### Left Prompt * Truncated CWD (just the current folder name) -* Git branch and dirty state (if applicable) \ No newline at end of file +* Git branch and dirty state (if applicable)