New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fishline v2.0.0 #14
Merged
Fishline v2.0.0 #14
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- No longer uses builtin function prompt_pwd to take advantages of fish-shell array variable - Always use `[ ]` instead of `test` for everything make a comparison between 2 argument as its clearer to read - We are still using `test` for things like `test -d file` or `test -w folder` as this is applied to a single argument
Change means to get all git information Use git status --porcelain as it is reliable accross all git version Use git rev-parse to check if branch is detached and the number of ahead and behind commit It will also show you the tag when detaching to a tag
- Major changes: - You can now pass the SEGMENT you want to pass to Fishline as positonnal argument - You now pass the last_status to Fishline using the option `-s $status` - Fishline is now able to output a `fish_right_prompt` compatible prompt using the `-r` option - Addition of the `-l` option, which is the default and will output a `fish_prompt` compatible prompt - Backward compatibility: - Prompt setup using the `FLINE_PROMPT` variable will work as expected with the previous version - If you dont pass your last status using the `-s` option, Fishline will try to get it from the first non optionnal argument (same as in v1) - Breaking changes: - Any theme setting one of the following var `FLSYM_PRE_CLOSE`, `FLSYM_CLOSE`, `FLSYM_POST_CLOSE`, `FLSYM_SEPARATOR` will no longer work. You will need to modify them using the replacing vars (see `themes/tty-compatible.fish`)
…ll not print an error on detached commit that are not part of any tag
- Work as STATUS for return code < 126 - For return code from 126 to 160 it translate return code to its meaning - Translate return code 126 to 'NOEXEC' - Translate return code 127 to 'NFOUND' - Translate return code from 129 to 159 (SIGNAL return code) to their meaning Exemple: - Process exited from Ctrl+C will show SIGINT instead of 130 - Process exited from Segmentation Fault will show SIGSEGV instead pf 129
…$SIG` return SIGNAME in lowercase
- Change sed '-r' flag changed to '-E' as '-r' is not availlable on MacOSX - Change '\n' in sed expression by a call to tr (know issue with `sed -E` on MacOSX) - Fix test.fish sed expression as '\S' was not working as expected - Fix `sed` expression that added a '\n' to the PATH on MacOSX in the FULLPWD segment
7 tasks
Bugfix required on
|
- when inside a new repository without any commit it will now show you as detached on master - this tells you that you are in a repository that does not have a root commit - added a trigger for the FLEVENT_GIT when the .git folder is created
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fishline
usage:fishline
using the option-s $status
fishline
is now able to output afish_right_prompt
compatible prompt using the-r
option-l
option, which is on by default and will output afish_prompt
compatible prompt (just to have an opposite to the-r
option)fishline
backward compatibility:FLINE_PROMPT
variable will work as expected with the previous version-s
option, Fishline will try to get it from the first positional argumentFLSYM_PRE_CLOSE
,FLSYM_CLOSE
,FLSYM_POST_CLOSE
orFLSYM_SEPARATOR
will no longer work. You will need to modify them using the replacing vars (see themes/tty-compatible.fish)SIGSTATUS
:FLINT_TEST
and test scripttest.fish
:FLINT_TEST
is a new internal function intended to be used to test a segment in a specific context:FLINT_TEST SEGMENT1 [SEGMENT2 [SEGMENT 3]]
FLINT_TEST
callsfishline
to create aread
prompt showing how the segment will be printed as afish_prompt
andfish_right_prompt
FLINT_TEST_STATUS
environment variable is set it will be passed tofishline
before printing your segmentFLTEST_SIGSTATUS
test.fish
is the test script that will call everyFLTEST_SEGNAME
for the segment passed as positional argument, or all available segmentsFLTEST_$YOURSEGMENT
function in yoursegments/yoursegment.fish
fishline
on Ubuntu 12.04, Debian 8 and Mac OS X Mavericks.GIT
segment is now compatible withgit
version< 1.8.5
PWD
segment will no longer callprompt_pwd
but use its one method to transform your current path to afish
array.[ ]
instead oftest
for everything make a comparison between 2 argument as its clearer to readtest
for things liketest -d file
ortest -w folder
as this is applied to a single argument and makes sense