- Consolidates the switch-adding logic for readability.
- Replaces "[[ ... ]] && ..." with "if [[ ... ]]; then ..." in some
cases to avoid a spurious nonzero exit status from _zsh_tmux_plugin_run.
- Puts error message on stderr instead of stdout
This reverts commit 9544316ef9.
This setting broke mouse / touchpad scroll on programs using `less` output
due to it not using the alternate screen buffer.
Fixes#7025
When a commit has multiple tags associated to it, the git-prompt will
throw the following error:
git_super_status:[:4: integer expression expected: v0.21.x\ntags/v0.21.5,
git_super_status:[:7: integer expression expected: origin/v0.21.x,
git_super_status:[:11: integer expression expected: origin/v0.21.x,
git_super_status:[:14: integer expression expected: v0.21.x
git_super_status:[:23: integer expression expected: v0.21.x
This is due to the prompt expecting the tag field to be a single word
with no spaces in between but if there are multiple tags the python
script returns a string with ', ' space separated list of tags.
This throws off the parser. The solution is to ensure that the python
script returns a space-less string ensuring the git-prompt parser to
properly parse the data.
Signed-off-by: Thanh Ha <zxiiro@linux.com>
The option '-F' causes 'less' to automatically quit if the contents fit
the screen and the option '-X' causes 'less' to not clear the screen after
quit. I think both options are generally useful for terminal applications.
They are in particular useful for Git as it runs all output through a
pager. Git will run 'less' with '-FRX' by default if the environment
variable $LESS is not defined [1]. Since oh-my-zsh used to set $LESS to
'-R', Git would not override this setting. Consequently, Git would
display even a single line of output in a pager and the user would need
to explicitly quit that pager (see mailing list discussion [2]).
Therefore, lets change the oh-my-zsh default value for $LESS to '-FRX'.
This would be useful for oh-my-zsh Git users and likely for users of
other applications that use 'less' too.
[1] 36438dc19d/Documentation/config.txt (L819-L821)
[2] https://public-inbox.org/git/2412A603-4382-4AF5-97D0-D16D5FAAFE28@eluvio.com/
When invoking a shell as root using ```sudo -s```, the ssh-agent plugin
starts a new agent although it already exists.
The problem boils down to a check if ssh-agent is running using
```ps x```. If that is extended to ```ps ax``` for root, then the
existing ssh-agent will still work.
- Add double quotes to command so that the next argument isn't
interpreted as the title for the start command.
- If the first argument is a valid path, convert it to Windows path
notation. If `wslpath` fails—because it's a path from inside WSL,
which cannot be converted to Windows path notation— fail with an
error code.
This last circumstance will show an error like so:
wslpath: path: Result not representable