Compare commits

...

10 commits

Author SHA1 Message Date
75549ce640 change main prompt icon 2023-12-16 22:22:41 -08:00
Matej yangwao
ec39d2e244
Merge pull request #5 from scorphus/stderr-done-right
Replace disabled stderr redirection char ^ with 2>
2021-08-07 10:10:54 +02:00
Pablo Santiago Blum de Aguiar
2a86d21ed8 Replace disabled stderr redirection char ^ with 2>
Since [Fish 3.3.0][1], redirection to standard error with the `^`
character has been disabled by default.

Ref [oh-my-fish/oh-my-fish#585][2]

[1]: https://github.com/fish-shell/fish-shell/blob/master/CHANGELOG.rst#deprecations-and-removed-features-1
[2]: https://github.com/oh-my-fish/oh-my-fish/issues/585
2021-08-06 20:29:24 +02:00
Matej Nemček
868259ef13
Merge pull request #3 from The-Bob/master
Fix mode indicator
2020-04-23 09:14:53 +02:00
The-Bob
de43ccfaa1 fix mode indicator 2020-04-22 17:21:38 -07:00
Matej Nemček
6f7466f44b updated features in readme 2016-11-28 22:54:43 +01:00
Matej Nemček
21f0f6c952 updated screenshot 2016-11-19 20:33:36 +01:00
Matej Nemcek
2e17eb7845 bump 2016-11-19 20:32:25 +01:00
Matej Nemcek
5735761659 updated screenshot 2016-11-19 20:31:18 +01:00
Matej Nemček
6bccf955ad yay fixed links 2016-11-19 20:16:48 +01:00
4 changed files with 61 additions and 56 deletions

BIN
.fish_prompt.fish.swp Normal file

Binary file not shown.

View file

@ -6,15 +6,15 @@ A fish (shell) theme with a Slavic cat and a rainbow that signifies git status.
[![Oh My Fish](https://img.shields.io/badge/Framework-Oh_My_Fish-blue.svg?style=flat)](https://github.com/oh-my-fish/oh-my-fish) [![Oh My Fish](https://img.shields.io/badge/Framework-Oh_My_Fish-blue.svg?style=flat)](https://github.com/oh-my-fish/oh-my-fish)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](/LICENSE) [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](/LICENSE)
![Slavic cat in action](https://github.com/yangwao/theme-slavic-cat/raw/master/screenshot.png) ![Slavic cat in action](https://github.com/yangwao/omf-theme-slavic-cat/blob/master/screenshot.png?raw=true)
## Instalation ## Instalation
#### Requirements #### Requirements
* [Fish shell][fish] - a smart and user-friendly command line * [Fish shell](https://github.com/fish-shell/fish-shell) - a smart and user-friendly command line
shell for OS X, Linux, and the rest of the family shell for OS X, Linux, and the rest of the family
* [Oh My Fish][omf] - The Fishshell Framework * [Oh My Fish](https://github.com/oh-my-fish/oh-my-fish) - The Fishshell Framework
Once Oh My Fish is installed: Once Oh My Fish is installed:
@ -24,8 +24,10 @@ Once Oh My Fish is installed:
## Features ## Features
* Minimal look * Minimal Look & Prompt
* Current short version pwd
* Display branch for Git projects * Display branch for Git projects
* Git project dirty status indicator *meow* **(R,C,A,U,M,?)** *meow* * Git project dirty status indicator *meow* **(R,C,A,U,M,?)** *meow*
* Fish shell vi mode indicator * Fish shell vi mode indicator
* Next line prompt * Next line prompt
* Two unicodes included!

View file

@ -11,82 +11,85 @@ set __slavic_color_purple 9458FF
set __slavic_color_lilac AE81FF set __slavic_color_lilac AE81FF
function __slavic_color_echo function __slavic_color_echo
set_color $argv[1] set_color $argv[1]
if test (count $argv) -eq 2 if test (count $argv) -eq 2
echo -n $argv[2] echo -n $argv[2]
end end
end end
function __slavic_current_folder function __slavic_current_folder
if test $PWD = '/' if test $PWD = /
echo -n '/' echo -n /
else else
echo -n $PWD | grep -o -E '[^\/]+$' echo -n $PWD | grep -o -E '[^\/]+$'
end end
end end
function __slavic_git_status_codes function __slavic_git_status_codes
echo (git status --porcelain ^/dev/null | sed -E 's/(^.{3}).*/\1/' | tr -d ' \n') echo (git status --porcelain 2>/dev/null | sed -E 's/(^.{3}).*/\1/' | tr -d ' \n')
end end
function __slavic_git_branch_name function __slavic_git_branch_name
echo (git rev-parse --abbrev-ref HEAD ^/dev/null) echo (git rev-parse --abbrev-ref HEAD 2>/dev/null)
end end
function __slavic_rainbow function __slavic_rainbow
if echo $argv[1] | grep -q -e $argv[3] if echo $argv[1] | grep -q -e $argv[3]
__slavic_color_echo $argv[2] "彡ミ" __slavic_color_echo $argv[2] 彡ミ
end end
end end
function __slavic_git_status_icons function __slavic_git_status_icons
set -l git_status (__slavic_git_status_codes) set -l git_status (__slavic_git_status_codes)
__slavic_rainbow $git_status $__slavic_color_pink 'D' __slavic_rainbow $git_status $__slavic_color_pink D
__slavic_rainbow $git_status $__slavic_color_orange 'R' __slavic_rainbow $git_status $__slavic_color_orange R
__slavic_rainbow $git_status $__slavic_color_white 'C' __slavic_rainbow $git_status $__slavic_color_white C
__slavic_rainbow $git_status $__slavic_color_green 'A' __slavic_rainbow $git_status $__slavic_color_green A
__slavic_rainbow $git_status $__slavic_color_blue 'U' __slavic_rainbow $git_status $__slavic_color_blue U
__slavic_rainbow $git_status $__slavic_color_lilac 'M' __slavic_rainbow $git_status $__slavic_color_lilac M
__slavic_rainbow $git_status $__slavic_color_grey '?' __slavic_rainbow $git_status $__slavic_color_grey '?'
end end
function __slavic_git_status function __slavic_git_status
# In git # In git
if test -n (__slavic_git_branch_name) if test -n (__slavic_git_branch_name)
__slavic_color_echo $__slavic_color_blue " ☭ " __slavic_color_echo $__slavic_color_blue " ☭ "
__slavic_color_echo $__slavic_color_white (__slavic_git_branch_name) __slavic_color_echo $__slavic_color_white (__slavic_git_branch_name)
if test -n (__slavic_git_status_codes) if test -n (__slavic_git_status_codes)
__slavic_color_echo $__slavic_color_pink ' ●' __slavic_color_echo $__slavic_color_pink ' ●'
__slavic_color_echo $__slavic_color_white ' (^._.^)ノ' __slavic_color_echo $__slavic_color_white ' (^._.^)ノ'
__slavic_git_status_icons __slavic_git_status_icons
else else
__slavic_color_echo $__slavic_color_green ' ○' __slavic_color_echo $__slavic_color_green ' ○'
end
end end
end end
function fish_mode_prompt
set_color $__slavic_color_lilac
printf '['
switch $fish_bind_mode
case default
set_color red
printf n
case insert
set_color green
printf i
case visual
set_color magenta
printf v
end
set_color $__slavic_color_lilac
printf '] '
end end
function fish_prompt function fish_prompt
set_color $__slavic_color_lilac __slavic_color_echo $__slavic_color_purple (prompt_pwd)
printf '[' __slavic_git_status
switch $fish_bind_mode
case default
set_color red
printf 'n'
case insert
set_color green
printf 'i'
case visual
set_color magenta
printf 'v'
end
set_color $__slavic_color_lilac
printf '] '
__slavic_color_echo $__slavic_color_purple (prompt_pwd)
__slavic_git_status
echo echo
__slavic_color_echo $__slavic_color_pink " " __slavic_color_echo $__slavic_color_pink "▶ "
end end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 211 KiB