2012/8/26 ridiculous_fish <corydo...@ridiculousfish.com>
> Hello fellow fish fans,
>
> I'm working on a prompt editor, which will include a bunch of sample
> prompts that the user can preview and then use (or edit). I'd like to
> include real prompts contributed by real users, showing the range possible
> prompts.
>
> If you're willing, please send me the following:
>
> - Your fish_prompt function, or file if it contains multiple functions
> - A suggested short name for it, hopefully descriptive ("Minimalist", "Git
> Savvy" ), or evocative ("Lotus Blossom"), or failing that, your name is
> fine ("Richards")
> - If you like, an attribution line ("John Doe's prompt -
> http://www.mysite.com")
>
> You can send it directly to me at corydo...@ridiculousfish.com, or post
> it to the list if you want to strut your stuff.
>
> For the record, here's my prompt, which I'm calling "Minimalist" (but may
> change it if we get a bunch of minimalist prompts):
>
> function fish_prompt
> set_color $fish_color_cwd
> echo -n (basename $PWD)
> set_color normal
> echo -n ' ) '
> end
>
> Thanks for any and all contributions!
>
> _fish
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
>
Hello,
Here is mine !
Name: Nim
Attribution line: Guilhem "Nim" Saurel − https://github.com/nim65s/dotfiles/
It changes differents colors when the return of the last command is not 0,
when you are root, and/or when you are in ssh.
It also detects when you are in a tty and use ASCII instead of UTF-8,
and shows some informations about battery and background jobs when useful.
-----------------------------
function fish_prompt
and set retc green; or set retc red
tty|grep -q tty; and set tty tty; or set tty pts
set_color $retc
if [ $tty = tty ]
echo -n .-
else
echo -n '┬─'
end
set_color -o green
echo -n [
if [ $USER = root ]
set_color -o red
else
set_color -o yellow
end
echo -n $USER
set_color -o white
echo -n @
if [ -z "$SSH_CLIENT" ]
set_color -o blue
else
set_color -o cyan
end
echo -n (hostname)
set_color -o white
#echo -n :(prompt_pwd)
echo -n :(pwd|sed "s=$HOME=~=")
set_color -o green
echo -n ']'
set_color normal
set_color $retc
if [ $tty = tty ]
echo -n '-'
else
echo -n '─'
end
set_color -o green
echo -n '['
set_color normal
set_color $retc
echo -n (date +%X)
set_color -o green
echo -n ]
if [ (acpi -a 2> /dev/null | grep off) ]
echo -n '─['
set_color -o red
echo -n (acpi -b|cut -d' ' -f 4-)
set_color -o green
echo -n ']'
end
echo
set_color normal
for job in (jobs)
set_color $retc
if [ $tty = tty ]
echo -n '; '
else
echo -n '│ '
end
set_color brown
echo $job
end
set_color normal
set_color $retc
if [ $tty = tty ]
echo -n "'->"
else
echo -n '╰─>'
end
set_color -o red
echo -n '$ '
set_color normal
end
-----------------------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users