Cocotte will colorize your iTerm tabs according to the parameter you pass. It is meant to work with your folder, giving a large hue range while being stable and more or less following the alphabetical order.
cocotte $(pwd)
# takes the path, do some computation and color your iterm tab according to this value.cargo build --releaseCreate a .cocotterc.toml:
- in your config home
- or in
~/.config/(XDG base directory specifications)
Example:
blacklist = [
"Users",
"pierrebaillet",
".",
"Documents",
"src",
"datadog",
"mine"
]-
list of path segments to ignore when computing the colour
-
this is a list a
CASE SENSITIVEitems (changed after v1.0) -
if a parameter is only containing
blacklistitems, cocotte will return black as color:
cocotte -v -r /Users/pierrebaillet/src/github.com
Verbose enabled.
Reading configuration from: "/Users/pierrebaillet/.cocotterc.toml"
Black list is: ["users", "pierrebaillet", ".", "Documents", "src", "datadog", "mine", "github.com", "go"]
Using input string: /users/pierrebaillet/src/github.com
Path components after filtering: []
R:0 G:0 B:0cocotte --helpcocotte $(pwd)
cocotte -v -f html /users/pierrebaillet/src/github.com/mysuperepoVerbose enabled.
Reading configuration from: "/Users/pierrebaillet/.cocotterc.toml"
Black list is: ["users", "pierrebaillet", ".", "Documents", "src", "datadog", "mine", "github.com", "go"]
Using input string: /users/pierrebaillet/src/github.com/mysuperepo
Path components after filtering: ["mysuperepo"]
R:0 G:254 B:164function ssh
cocotte $argv
/usr/bin/ssh $argv
endIn your fish_prompt configuration file
function fish_prompt
# [....]
if test (command --search cocotte)
cocotte (pwd)
end
endTo dynamically update your tab based on your current directory you use PROMPT_COMMAND
edit ~/.bash_profile and add the lines below (if cocotte is not in your $PATH you need to replace it by the full path to cocotte)
cocotte_update ()
{
cocotte $(pwd)
}
PROMPT_COMMAND="cocotte_update; $PROMPT_COMMAND"Thanks for contributing!
- Clément Delafargue @divarvel
- Francois BAYART @frbayart
