Rerunning `ls` appends `--color=auto` to executed command
Testing #156001
In Remote-WSL + bash + subshell, if I run ls and then use the command decoration to rerun the command, it instead runs ls --color=auto.

This is also the reason git may be replaced by hub; we're sending the alias resolved command line instead of the raw command line as input.
We should also verify this doesn't happen with aliases in zsh
fyi verifier, reproduces in normal bash in a non-subshell
to reproduce:
- run
aliasin abashterminal to see the ones you've defined - run the part to the left of
= - via the command decoration menu,
rerun command - 🐛 the command's alias (part to the right of
=) is the input
We should also verify this doesn't happen with aliases in zsh
it does not
the alias value is also displayed in the run recent command quickpick atm
I thought of an even better idea to what we talked about, we could use the old history method to supplement our current better method; if there are no problematic histcontrol settings and the latest history command changed between precious and now, assume it was an alias and use that?
@joyceerhl could you verify this one when you get a chance?
🤔 still seems to repro in Remote-WSL

Version: 1.71.0-insider (user setup) Commit: e3043ebbc6f73fe66beb80ce6312818ae0e66798 Date: 2022-08-23T10:56:12.685Z Electron: 19.0.12 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Windows_NT x64 10.0.22000 Sandboxed: Yes
Does echo $HISTCONTROL show anything? My Ubuntu wsl shows ignoreboth in which case we cannot use that history method which is a known edge case that I don't think we can handle currently and is not worth tracking imo.
Yeah the output is ignoreboth. Is there a value I can change that to which would allow me to verify the fix?
@joyceerhl it can be set to the empty string or ignorespace - set this in your ~/.bashrc which should run before shell integration
✅
