The variable 'as_echo' is not set in a virgin shell, but by 'autoconf'
and friends. Setting the default value to 'echo' facilitates running
'configure' in a virgin shell.
* filesystem/main-config.site: see above.
* filesystem/mingw32-config.site: see above.
* filesystem/mingw64-config.site: see above.
Fixes#1518
If msys2 bash is set as the DefaultShell for the Win10 OpenSSH server,
there is no way to pass -l to make it a login shell, so /etc/profile is
not sourced, PATH is not set, and the bashrc produces errors.
Detect this case in /etc/bash.bashrc, by checking for the SSH_CONNECTION
environment variable and PATH not having msys2 elements, and source
/etc/profile.
Enables users to take action (e.g. in `~/.bash_profile`) if msys was invoked with `CHERE_INVOKING` set.
Example usage (start in same directory as at last logout) :
Add to ~/.bash_profile:
# Change to pwd at last logout unless $CHERE_INVOKING was set
if [ ! -z "${CHERE_INVOKING_VISIBLE_FOR_USER}" ]; then
unset CHERE_INVOKING_VISIBLE_FOR_USER
else
[ -s ~/.lastdirectory ] && cd `cat ~/.lastdirectory`
fi
Add to ~/.bash_logout:
pwd > ~/.lastdirectory
6e6310d (filesystem: New specific variable MSYS2_PS1., 2016-05-01)
introduced the MSYS2_PS1 prompt script priority to allow multiple
device configurations.
Unfortunately, if MSYS2_PS1 was not set it overwrote the $PS1, even
when specifically set by the users configuration, such as provided in the
Git-for-Windows SDK (see https://github.com/git-for-windows/git/issues/794#issuecomment-227401839)
and the monkey patch fix (https://github.com/git-for-windows/build-extra/pull/122).
Introduce a priority order so that the user's $PS1 (if set) has an
intermediate priority between the MSYS2_PS1 and the default PS1.
Signed-off-by: Philip Oakley <philipoakley@iee.org>
* Avoid continuously appending items to MANPATH and INFOPATH when
sourcing /etc/profile multiple times.
* Check for .bashrc existence in shell manager.
Now users don't need to override installation prefix for MinGW programs and
'configure' scripts use more compatible triplet 'x86_64-w64-mingw32`
automatically instead of 'x86_64-pc-mingw64`.
* Improve shell manager to run existing executable files provided as
first argument, instead of opening them with Windows Explorer.
* Add simplified parameter -here to shell starter, making the directory
argument optional and deprecating the -where parameter.
* Add -help parameter to shell starter.