twolfson / sexy-bash-prompt

Bash prompt with colors, git statuses, and git branches.
MIT License
1.14k stars 155 forks source link

Prefixing exported functions with "prompt" #39

Closed luizberti closed 10 years ago

luizberti commented 10 years ago

Since all of the functions in the script are being exported into the environment, maybe we should reconsider their generic names since they can be invoked from the interactive shell.

For example, instead of is_branch1_behind_branch2, call it prompt_is_branch1_behind_branch2. is_ or get_ are too generic for something so specific that's being exported into the ecosystem, and have a chance of interfering with autocompletion for some other commands (as in my case).

Prefixing the exported functions with prompt or promptfn would be an easy and sensible solution.

rpdelaney commented 10 years ago

I tend to agree. It's an easy change without much of any downside.

luizberti commented 10 years ago

I'm currently working on a pull request here, still have some issues to squash though...

twolfson commented 10 years ago

I am down for prefixing them. I believe we exposed them for testing exclusively but we should be good netizens about it.