Skip to content

Some additions to the docs - #2290

Closed
faho wants to merge 54 commits into
fish-shell:masterfrom
faho:docs
Closed

faho wants to merge 54 commits into
fish-shell:masterfrom
faho:docs

Conversation

@faho

@faho faho commented Aug 10, 2015

Copy link
Copy Markdown
Member

So I went through the old issues and pullrequests and tried to document some of them.

Since I'm not much of a doc-writer I'd appreciate feedback.

@faho

faho commented Aug 10, 2015

Copy link
Copy Markdown
Member Author

Okay, the printf documentation is based on the comment in builtin_printf.cpp.

I tried to test it, but I very well could have missed something. I also hope the examples are useful.

@faho

faho commented Aug 10, 2015

Copy link
Copy Markdown
Member Author

It appears a printf doc was already added in 516be01, and removed again in d4c8817 by @siteshwar.

I don't quite believe the rationale - we can ship friendlier docs (fish is the "friendly" shell, after all) and then for deeper information refer to the system man page (though I never quite figured out how that section stuff is supposed to work - is it printf(1p)). Anyway, printf is one of those GNU things that ship the barest of manpages and then refer to info. My version of the 1 man page doesn't even specify the format characters, and mentions a "--help" and "--version" option that fish's printf doesn't accept.

It also says:

NOTE: your shell may have its own version of printf, which usually supersedes the version described here. Please refer to your shell's documentation for details about the
options it supports.

The 1p page is actually useful.

@faho

faho commented Aug 10, 2015

Copy link
Copy Markdown
Member Author

Also, \fish man formatting seems to be borked regarding "%":

printf 'ss\n' flounder fish

@faho faho mentioned this pull request Aug 13, 2015
@faho

faho commented Aug 30, 2015

Copy link
Copy Markdown
Member Author

Ping @fish-shell/contributors @fish-shell/owners. I'd like to merge this, but I'm not sure about the printf documentation since it shadows the system's man page. But for GNU printf that borders on the useless, diverges from fish printf (it accepts "--help" and "--version" where fish printf accepts no options) and refers to the shell's version anyway.

@zanchey

zanchey commented Aug 31, 2015

Copy link
Copy Markdown
Member

I think the printf documentation is a good idea; you make a good case for it. I'd be happy to review the other changes as well - perhaps tonight?

@faho

faho commented Sep 8, 2015

Copy link
Copy Markdown
Member Author

@zanchey: Ping?

@ghost

ghost commented Sep 8, 2015

Copy link
Copy Markdown

@faho For what is worth, it LGTM.

jcelliott and others added 17 commits September 8, 2015 22:01
When an error occurs midway through a token, like abc(def,
make the caret point at the location of the error (i.e. the paren)
instead of at the beginning of the token.
Enable -Wunused-macros, and remove said unused macros
There are two main problems in the existing Fossil autocompletion that this
patch solves:

  * Because Fossil lacks an alias system similar to those in Hg and Git,
    wrapper scripts are common, and aliasing them to `fossil` is also fairly
    common. The lack of the `command fossil` pattern in the completions script
    meant that the actual fossil command might not be called, but rather the
    alias. This problem has been fixed by introducing a __fish_fossil command,
    similar to the __fish_hg and __fish_git commands in those completion shells,
    that does this, and converting all explicit fossil calls in the completion
    script to use __fish_fossil instead
  * Because there's now a centralized location for calling Fossil, I also moved
    all of the repetitive stderr redirects that function.

This results in more robust and cleaner code.
Avoids differences in widths of wchar_t, hopefully addressing
issue fish-shell#2284
This is already done by fish before calling the completion.

It breaks completion with combiners (fish-shell#2025) and also with wrappers.

(This does not include git because that's better solved in fish-shell#2145)
faho and others added 19 commits September 8, 2015 22:01
That change was a bit too eager as the mkfifo route doesn't currently work.

See fish-shell#1040 and fish-shell#2052.

This reverts commit a17b9fd.
This doesn't work with fish_config.

For terlar and pythonista, remove unnecessary color setting.

For informative+git and pythonista, move variable setup into fish_prompt

Fixes fish-shell#1141
Why this is only in some, I don't know, but these don't seem to
interfere with anything.

Fixes fish-shell#2309
fish_user_key_bindings is the user's, and they should know if they want
vi-ish bindings or emacs-ish (or nano-ish). If they want to define
multiple, they can also do that (e.g. via checking what
$fish_key_bindings is set to).

Fixes fish-shell#2254

CC @kballard
Prevents an annoying error message.
Fixes fish-shell#2363.
While not a huge thing, wrong variable names always carry great
confusion potential.
Modified files are provided for completion
Staged files are now offered for completion
git reset allows for files and branches as completion results
@faho

faho commented Sep 8, 2015

Copy link
Copy Markdown
Member Author

Ooh, that rebase makes things weird.

The only thing I added was the last commit b78afee.

Comment thread doc_src/funcsave.txt

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is worth expanding on this.
How about:
"Functions are loaded on-demand, which means that saved functions containing <a href="index.html#event">event handlers</a> are not installed when a new shell is started. To activate an event handler for every new shell, add the whole function to your <a href="index.html#initialization">shell initialization file</a>."

@zanchey

zanchey commented Sep 11, 2015

Copy link
Copy Markdown
Member

Added some suggestions - happy for you to merge!

@faho

faho commented Sep 11, 2015

Copy link
Copy Markdown
Member Author

Merged with corrections as 73a5e2b..2c648c8 (so we can revert the printf stuff if anyone else objects).

It seems the rebase only threw git_hub_ off, not git itself.

@faho faho closed this Sep 11, 2015
@faho
faho deleted the docs branch September 11, 2015 09:35
@faho faho added this to the next-2.x milestone Sep 11, 2015
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.