Commit Graph

246 Commits

Author SHA1 Message Date
Cameron Moon
ee8e150424 rename flag from 'force' to 'yes' 2017-08-08 12:46:23 +10:00
Cameron Moon
d204ecdb5b Enable vi mode display for hybrid_bindings
Vi mode display should be enabled for people using the hybrid_bindings
function found in the fish documentation.
2017-08-08 12:20:14 +10:00
Cameron Moon
5337033ee4 Add option to force show vi mode 2017-08-08 12:19:10 +10:00
Philip Blyth
e2cf9a7d3b Removed trailing white-space 2017-08-02 23:45:27 +01:00
Philip Blyth
7e6543a3f0 Merge branch 'master' into git-glyphs 2017-07-18 14:49:45 -04:00
Jingkai Tang
9ec8d2cf24 Fix git warnings in __bobthefish_prompt_git 2017-07-10 15:04:40 +08:00
Andrew Choo
0b3b522160 Implement newline cursor feature with one option instead of three
Per bobthecow:

"In keeping with bobthefish's goal to be opinionated but flexible,
let's do this with one option, not three. I'm leaning toward:

set -g theme_cursor_on_new_line yes
Then:

Always show the arrow at the end of the first line
Always show a minimalist arrow at the start of the next line"
2017-06-17 11:37:12 -04:00
Andrew Choo
176c3a7a69 Remove tabs 2017-06-10 22:51:31 -04:00
Andrew Choo
28dfc4f985 Add ability to have cursor start on a new line
In order for the right prompt to work the new line must start with at
least one character. A space is used for this purpose. This looks a bit
strange so added option to include the default right arrow glyph. Lastly,
added option to remove the right arrow glyph on the first (top) line.
2017-06-10 22:51:14 -04:00
Philip Blyth
dc151776b6 moar git-glyps! 2017-05-18 17:10:24 -04:00
Philip Blyth
f8c8dc7f07 Moved Git chars to glyph variables 2017-05-03 15:23:28 -04:00
Justin Hileman
87534a008a Fix issues when RBENV_ROOT/version doesn't exist.
Fixes #89
2017-04-26 20:12:30 -07:00
Justin Hileman
1eb4cf63ac Show vi mode prompt in hybrid key bindings too. 2017-03-07 05:23:18 -08:00
Justin Hileman
cbae8ad3fc Fix git worktree support.
Fixes #82
2017-02-28 07:09:38 -08:00
LaurentTreguier
cb6bb0ecb3 Use a different glyph color when using fakeroot 2017-02-27 20:44:01 +01:00
LaurentTreguier
23fdcb8048 Display superuser glyph when using fakeroot 2017-02-27 10:37:15 +01:00
Justin Hileman
750030a110 Remove a ton of set_color normal calls.
Eases the pain of fish-shell/fish-shell#3793 just a bit.

This _shouldn't_ ever look any different to the end user. I think.
2017-02-01 05:13:31 -08:00
Justin Hileman
9b414bc6fb Speed up git ahead/behind parsing by ~20% 2017-01-30 07:33:52 -08:00
Justin Hileman
908a7b5365 s/sed/string replace builtin/g 2017-01-29 20:02:01 -08:00
Justin Hileman
86116b7e80 Merge pull request #72 from kephas/master
Display user in terminal title
2017-01-19 10:15:54 -08:00
Jelte Fennema
b5f7b1eaee Make python --version a single line
Pypy outputs two lines and  causes an error this way.
2017-01-17 19:30:41 +01:00
Pierre Thierry
551a768534 Display user in terminal title 2017-01-10 00:55:09 +01:00
Justin Hileman
48f067bac0 Add support for full paths in prompt
(and support for abbreviated project-relative paths!)

Use `fish_prompt_pwd_dir_length` and `theme_project_dir_length` to control the number of characters shown from each parent directory name.

Fixes #68
2016-12-29 16:12:55 -08:00
Justin Hileman
ee5c1e29b8 More efficient python version checking, capture pypy3. 2016-10-18 07:25:22 -07:00
Justin Hileman
dca95833dc Merge pull request #60 from rominf/master
Fix #52
2016-10-18 07:23:39 -07:00
Justin Hileman
1f827c6bab Update vi mode prompt.
* Default to showing vi mode prompt (if the current bind mode is vi). Allow overriding by setting it `theme_display_vi` to `no`.

* Remove `theme_display_vi_hide_mode`, because I don't like the prompt jumping around when changing modes.

* Override `fish_mode_prompt` because we're already handling it inside `fish_prompt`. Add a note so future code archeologists can figure out how to override.

* Add support for `replace-one` bind mode.

Fixes #65
2016-10-18 07:04:59 -07:00
Roman Inflianskas
a2df7fbacd Fix #52 2016-08-28 23:32:52 +03:00
Justin Hileman
ff560c97a8 Merge pull request #57 from Jguer/master
Add Gruvbox Theme
2016-08-27 09:05:24 -07:00
Justin Hileman
8898658a9a Speed up Vagrant status code by 10-15x.
(Excluding whatever time is spent getting the status from the provider, of course. Can't do much with that)

See #56
2016-08-25 12:18:10 -07:00
Justin Hileman
ca7a3ecaa2 Merge pull request #56 from rickard-von-essen/vargrant-prl
Improved Vagrant provider detection and support for parallels provider.
2016-08-25 12:15:13 -07:00
Justin Hileman
02c4c51973 Whoops. Forgot the non-nerd-fonts tag glyph :) 2016-08-25 08:06:23 -07:00
Justin Hileman
4669e3dad6 Add better tag support in the git branch segment. 2016-08-25 08:01:08 -07:00
Justin Hileman
b2f097c91c Glyph cleanup
* Rearrange overrides so they're closer to what they're overriding
* Remove some unused Powerline glyph definitions
* Use all the pretty Octicons when Nerd Fonts support is enabled
2016-08-25 07:59:01 -07:00
Rickard von Essen
525416cc19 Improved handling of Vagrantfiles with multiple providers 2016-08-22 21:38:28 +02:00
Jguer
3ecd0726ca Changed path segment for gruvbox 2016-08-22 12:00:02 +01:00
Rickard von Essen
54ef10a844 Make provider a local var 2016-08-22 08:22:04 +02:00
John Guerreiro
22451d400f Fixed repo color to green instead of yellow 2016-08-22 02:45:23 +01:00
Jguer
1133c4b7bf Added gruvbox theme 2016-08-22 02:40:15 +01:00
Rickard von Essen
2cc237267e Improved Vagrant provider detection and support for parallels provider.
Improved the detection of Vagrant provider. The previouse didn't
correctly detect which provider was used.

Added support for detecting the state of Parallels vagrant provider.
2016-08-21 21:11:35 +02:00
Justin Hileman
ab720a3bb3 Add docker and theme configs to fish_prompt comment. 2016-06-08 19:31:16 -07:00
Justin Hileman
ac1a6e230c Update docker segment to use new color variables.
See #47
See #48
2016-06-08 01:21:13 -07:00
Justin Hileman
e39a850ed0 Merge pull request #48 from feinstruktur/master
Docker machine display and conditional date
2016-06-08 01:15:24 -07:00
Sven A. Schmidt
77977f882f Added -d to function 2016-06-08 08:33:41 +01:00
Don March
0ea2e743a7 Add example code for a custom color scheme 2016-06-07 13:48:40 -04:00
Sven A. Schmidt
d730526c07 Added settings variables to allow date and docker display to be made conditional 2016-06-07 08:31:34 +01:00
Don March
023030fd50 Improve __bobthefish_display_colors variable
Per suggestions from @bobthecow.
2016-06-07 01:30:18 -04:00
Justin Hileman
0ac50039a7 Color schemes tweaks for themes with more limited palettes. 2016-06-06 21:56:14 -07:00
Don March
672c637f94 Add configurable color schemes
* Refactor fish_prompt.fish to use semantically named variables
  throughout the script rather than specific colors. Set those variables
  to various colors depending on the `theme_color_scheme` variable.

* Add the `__bobthefish_display_colors` function to easily test and
  preview different color schemes.

* Update documentation.

Fixes #7.
2016-06-06 18:38:19 -04:00
Sven A. Schmidt
43af67f68a Added segment to display DOCKER_MACHINE_NAME (indicating which docker daemon we're talking to) 2016-06-01 14:50:14 +01:00
pik
cfb7c7df79 Support chruby ruby_version for show_ruby() 2016-05-23 20:48:09 +08:00
Justin Hileman
f269522c8c Merge pull request #43 from caesar/git-status-colors
Change colors for git staged and stashed statuses
2016-05-22 07:05:16 -07:00
Caesar Schinas
9ce0cc2383 Remove quotes for consistency 2016-05-17 18:33:31 -03:00
Caesar Schinas
22fabb438e Use ⎇ symbol if Powerline is disabled 2016-05-17 17:57:56 -03:00
Caesar Schinas
4dd6a6d3ca Change colors for git staged and stashed statuses 2016-05-17 17:38:01 -03:00
Caesar Schinas
cb4f97fe96 Make using Powerline glyphs the default 2016-05-15 22:18:28 -03:00
Caesar Schinas
ac57f8959b Add option to not use Powerline glyphs 2016-05-15 20:43:01 -03:00
Justin Hileman
c2efeb5740 Make bobthefish git worktree aware
Fixes #29
2016-04-30 22:09:25 -07:00
Justin Hileman
e01fe9aaac Fix leaky colors from the right prompt
Fixes #31
2016-04-04 11:36:11 -04:00
Justin Hileman
d7fe9b42bd Performance improvements. Thanks builtins! 2016-03-30 16:13:39 -07:00
Justin Hileman
aa83e34148 Use command for a few more things that get overridden 2016-03-30 13:24:51 -07:00
Justin Hileman
088a0f44e0 Consistency++
* Only use if/end blocks for things longer than one line.
 * Only use inline `[ foo ]; and bar` style when `bar` is `return`. Break the `and`/`or` onto a second line for anything that actually has a side effect.
 * More consistent use of `echo` flags.
 * Don't use `pwd` when `$PWD` will do.
2016-03-29 23:55:58 -07:00
Justin Hileman
3db31f0c52 Faster! 2016-03-11 13:28:47 -08:00
Justin Hileman
89ab00e768 Use local variables for teh rubies. 2016-03-11 11:24:46 -08:00
Justin Hileman
daa9025183 Merge pull request #24 from LambdaLord/master
Replace some color constants with existing variables
2016-03-10 22:45:25 -08:00
Justin Hileman
3e72ddf0f9 Merge pull request #25 from paxy97/error_code
Add show error code option
2016-03-10 22:44:14 -08:00
Justin Hileman
cc1569f57c fix __bobthefish_vagrant_ids when no id present
because `cat` with no arguments just hangs out at stdin waiting for you to type something.
2016-03-09 16:54:32 -08:00
Pavle Portic
3d89a0a3fe Update README 2016-03-03 12:12:09 +01:00
Pavle Portic
0ab6f79efe Add show error code option 2016-03-03 03:40:04 +01:00
LambdaLord
7c49324381 Revert unnecessary name change 2016-03-02 06:39:59 +00:00
LambdaLord
ed0eb02dfb Quick rename for new variable 2016-03-02 06:04:16 +00:00
LambdaLord
10170cb856 Replaced some color values with new variable 2016-03-02 05:44:05 +00:00
LambdaLord
b137eb1bdc Replace some constants with existing greys 2016-03-02 05:23:45 +00:00
Johnny Robeson
b3e2982abf fix powerline patched fonts links 2016-02-20 02:10:48 -05:00
Justin Hileman
47eace4182 Fix some vagrant segment copypasta 2016-02-19 10:06:52 -08:00
Justin Hileman
29d78ebaf3 Clean up a bunch of redirects, make 'em fishier. 2016-02-19 07:53:59 -08:00
Justin Hileman
873289224e Grep the vagrantfile to check for vmware_fusion
It's naive, but more likely successful than checking for vmrun, which most people prolly never link.
2016-02-19 07:53:38 -08:00
Justin Hileman
a9cc3400fa Use type -q instead of which. 2016-02-18 23:16:08 -08:00
Justin Hileman
ad36c7ada5 Add rudimentary VMWare vagrant support.
Drive-by: simplify existing virtualbox support a bit.
2016-02-18 23:16:08 -08:00
Justin Hileman
1f13fd0888 Add nerd fonts support.
Use better glyphs for Ruby and Python.
2016-02-18 22:00:31 -08:00
Justin Hileman
63cd4de4ba Word. 2016-02-03 23:13:57 -08:00
Justin Hileman
6ca1ae9246 Get rid of the last $__bobthefish_* global! 2016-02-03 23:10:57 -08:00
Justin Hileman
c2b313408c Fix $status regression. 2016-02-03 23:09:57 -08:00
Sasha Egorov
62c77644b7 Add stopping state 2016-02-02 00:24:49 +04:00
Justin Hileman
1a20ff7194 Improve python version detection. 2016-01-25 08:00:29 -08:00
Justin Hileman
845f5f4aa6 Make all the $__bobthefish_* variables local
… and don't shadow variables in __bobthefish segment functions.

This might fix #18 and #19?
2016-01-25 07:06:48 -08:00
Justin Hileman
ac7c5c913b Add another space between virtualenv version and name
Fixes #16
2016-01-14 23:25:12 -08:00
Sasha Egorov
3e9ce36165 Typo in comment 2015-12-16 22:18:18 +04:00
Sasha Egorov
4190fa2e0d Meet Vagrant 2015-12-16 22:12:21 +04:00
Justin Hileman
ad41beee1b Update comments and readme for vi mode. 2015-11-22 07:48:49 -08:00
Oliver Schrenk
b094b1ec71 Early return 2015-11-22 12:53:49 +01:00
Oliver Schrenk
5314f8876a Support hiding of vi segment for special mode 2015-11-22 12:35:54 +01:00
Oliver Schrenk
92691a3c4e Move vi mode segment to front 2015-11-22 12:35:54 +01:00
Oliver Schrenk
af1e19724c Support vi mode 2015-11-22 12:35:54 +01:00
Sasha Egorov
370d867cc7 Title and time 2015-11-11 14:04:36 +04:00
Justin Hileman
b1dff8ef68 Prevent false positives for 'untracked' empty directories.
Fixes a regression in #13
2015-10-26 07:16:21 -07:00
hurin
5b88c7303c Fix extreme slowdown rendering git prompt with multiple untracked files 2015-10-26 18:20:09 +08:00
hurin
30c1ff9d8e Speed up rbenv prompt computation
ref: https://github.com/sstephenson/rbenv/issues/804
2015-10-26 18:20:05 +08:00
Justin Hileman
7221fb8a32 Fix "expected a combining operator" regression.
See #10
2015-10-14 08:23:34 -07:00
Justin Hileman
bbb6a4645b Cleanup: a couple superfluous setting. 2015-10-13 21:15:59 -07:00
Justin Hileman
336f1f1ce8 Cleanup: use named args for all sorts of current_dir 2015-10-13 20:40:44 -07:00
Justin Hileman
160bc9683e Add $theme_avoid_ambiguous_glyphs
Allow users to avoid ambiguous width glyphs to prevent issues with guessing the width of multibyte characters.

For now, this just avoids `…`. We'll add some more if we run into them.

Fixes #10
2015-10-13 20:34:35 -07:00
Justin Hileman
13c35f3424 Allow disabling the title segments.
set -g theme_title_display_process yes
    set -g theme_title_display_path no

See #11
2015-10-13 14:19:57 -07:00
Justin Hileman
00f5578311 Allow overriding the right prompt date format.
set -g theme_date_format "+%a %H:%M"

… or something like that :)

See #11
2015-10-13 14:18:48 -07:00
Tej Chajed
489a2eee3d Fix ahead printing when both ahead and behind
Specifically, the awk parsing bails out early if we're ahead, even
though there may be later behind commits, resulting in a status of just
"+" when "±" would be correct.
2015-06-26 11:01:02 -04:00
Justin Hileman
cd15f6551c Refactor "git ahead" logic:
* Revert removal of the less-verbose style
 * Extract logic into a helper function
 * Add a flag for enabling verbose style
 * Remove a pile of unnecessary local variables
 * Code style fixes
2015-06-24 14:51:44 -07:00
Johannes Schneider
e0d3abcaed
removed echo 2015-06-17 15:30:57 +02:00
Johannes Schneider
0d1f7868cd
improved ahead/behind showing 2015-06-17 12:54:02 +02:00
Justin Hileman
a18c9ab0fa [bobthefish] allow git untracked files override
Showing untracked files can be (very) slow on large NFS mounts. Allow the user to disable the '...' output when there are untracked files, either globally via fish config:

    set -g theme_display_git_untracked no

 or locally via git repo config:

    git config bash.showUntrackedFiles false

Fixes #434
2015-04-24 10:59:50 -07:00
Justin Hileman
d45898d4f0 Fix extraneous output from type on some fishes. 2015-04-23 10:31:52 -07:00
Liang Bo Wang
ce8ec8f220 Fix python version detection in theme bobthefish
Relax the python version matching, so `python` that symlinks to
either major versions (e.g. 2, 3) or minor versions (e.g. 2.7, 3.4)
can be properly detected.

Note that currently both pypy and pypy3 have same display glyph.
2015-02-22 18:17:33 +08:00
Justin Hileman
a08626d43f Fix for bobthefish ruby version segment
… when there's no version to show.

Fixes #370
2015-02-10 14:02:06 -08:00
Justin Hileman
e766f6c003 [bobthefish] Default hg segment to off
… due to performance concerns.

See #258
See #262
2014-11-28 19:41:55 +11:00
Justin Hileman
2a2532b752 [bobthefish] One more hg speedup.
Send along the directory where we already found the .hg to throw hg a bone.
2014-11-28 19:41:55 +11:00
Justin Hileman
e17a6871b4 [bobthefish] One more cleanup. 2014-11-28 19:41:54 +11:00
Justin Hileman
c8853f6f61 [bobthefish] Default display configs to yes 2014-11-28 19:41:54 +11:00
Roman Inflianskas
81f2cce0fb bobthefish: allow user disable segments
Conflicts:
	themes/bobthefish/fish_prompt.fish
2014-11-28 19:41:54 +11:00
Justin Hileman
f108e89f1a [bobthefish] Use @rominf's recursive hg to find hg root. 2014-11-28 19:41:54 +11:00
Roman Inflianskas
94f04d7260 bobthefish: hg: faster checking for hg repo (fix)
Conflicts:
	themes/bobthefish/fish_prompt.fish
2014-11-28 19:41:54 +11:00
Justin Hileman
1c38607b13 [bobthefish] Use brackets instead of test. 2014-11-28 19:41:54 +11:00
Justin Hileman
08f8217cbe [bobthefish] always use command hg 2014-11-28 19:41:54 +11:00
Justin Hileman
264b7cea78 [bobthefish] Use consistent sed delimiters. 2014-11-28 19:41:54 +11:00
Justin Hileman
1818ce9922 [bobthefish] Standardize stderr redirects. 2014-11-28 19:41:54 +11:00
Justin Hileman
3bdbfe8ee9 [bobthefish] much cleaner git "ahead" flag. 2014-11-28 19:41:54 +11:00
Justin Hileman
5ab89f663c [bobthefish] Add support for rbenv and RVM 2014-11-28 19:41:54 +11:00
Justin Hileman
52e7b2bae7 [bobthefish] Simplify bold segments.
Add support for --bold (and --underline) to the __bobthefish_start_segment function.
2014-11-28 19:41:53 +11:00
Justin Hileman
abed16f3aa [bobthefish] Better (faster, stronger) SCM segments
* Show the closest parent repo if $PWD is in both an hg and git repo.
 * Only find the repo root once per SCM, not two or three times :)
2014-11-28 19:41:53 +11:00
Justin Hileman
623d162f2b [bobthefish] More virtualenv tweaks
* Inline a one-line method that's called one place
 * Make sure __bobthecow_virtualenv_python_version doesn't fail if python isn't a symlink.
 * Add a visual segment indicator after python version glyph.
2014-11-28 19:41:53 +11:00
Justin Hileman
8ac71fb43f [bobthefish] Update virtualenv segment colors…
remove some additional unnecessary complication.
2014-11-28 19:41:53 +11:00
Justin Hileman
ea5640886b No need to save $RETVAL, $status works just fine 2014-11-20 14:02:02 -08:00
Justin Hileman
e5a6915b4e [bobthefish] More consistent project dir func names 2014-11-20 14:02:02 -08:00
Justin Hileman
7eaf74fa83 [bobthefish] DRY: we don't need two pwd-relative-to-project funcs 2014-11-20 14:02:02 -08:00
Justin Hileman
28609a1f76 [bobthefish] Switch git/hg priority in prompt
Add TODO to do this right :P
2014-11-20 14:02:01 -08:00
Justin Hileman
c1531ecfea [bobthefish] Add ☿ (mercury) glyph to hg prompt
This makes it easier (possible?) to distinguish between hg and git repos at a glance.
2014-11-20 14:01:21 -08:00
Justin Hileman
5867fde992 [bobthefish] Don't break when hg/git not found 2014-11-20 14:01:21 -08:00
Justin Hileman
510fffbd49 [bobthefish] Use hg root instead of hg stat for in_hg 2014-11-20 14:01:21 -08:00
Denis Kolesnikov
8f24d187f3 Added bookmark support to bobthefish theme mercurial prompt 2014-11-20 14:01:21 -08:00
Denis Kolesnikov
0af0d97cfd Added simple mercurial pormpt to bobthefish theme 2014-11-20 14:01:21 -08:00
Roman Inflianskas
0ab4077530 bobthefish: virtualfish: fix typo 2014-11-21 08:58:22 +11:00
Roman Inflianskas
5bde9565fa bobthefish: virtualfish: change color to blue 2014-11-21 08:58:21 +11:00
Roman Inflianskas
2ca04ca652 bobthefish: virtualfish: fix superscript 2014-11-21 08:58:21 +11:00
Roman Inflianskas
b80f893796 bobthefish: virtualfish: move at the front 2014-11-21 08:58:21 +11:00
Roman Inflianskas
cdbeffc30b bobthefish: added promt support for virtualfish 2014-11-21 08:58:21 +11:00
Justin Hileman
ada2c464b8 Fix bold flags leaking into prompt 2014-05-14 17:48:06 -03:00
Justin Hileman
2431e92680 Namespace all the bobthefishes. 2014-05-14 17:48:06 -03:00
Justin Hileman
706f0def36 Fix theme function descriptions. 2014-05-14 12:50:14 -04:00
Justin Hileman
4daec4a503 Add bobthefish theme. 2013-09-26 12:46:14 -07:00