Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up--bind command clears when capturing output in variable #1630
Comments
|
Instead of
Maybe someone could give a clue why output Note:
|
This seems nice, and I will probably use it. Thanks!
The reason for this, is so that the command can be used for more than just |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Issue
If I want to capture the output of an
fzfcommand (or pipe it to a next command),--bindcommands that print things (usingless) do not seem to work (I can only see the terminal flashing).It seems like it is launching less, but then exiting it for some reason
Example function
Here is an example of things going wrong.
What I basically want to achieve is a git commit browser like you show on your wiki page, but it should also output the commit hash, so that I could use it in the following way:
git commit --fixup=$(gcb)Note that inside the
--bindcommands, I needed to pipe the output from stdout to stderr (1>&2), because otherwise it would all be caught in the outputcommitvariable.