Commit Graph

7 Commits

Author SHA1 Message Date
Johannes Altmanninger
0ab6735450 Support $(cmd) command substitution as alternative to (cmd)
For consistency with "$(cmd)" and with other shells.
2021-07-13 21:33:42 +02:00
Fabian Homborg
4e4852c40a history: Improve bash import check
- Check for special characters *before* attempting to parse
- Also ignore lines with `{` and `*`
- Also skip lines with `<<` because that might be a heredoc (or a
- `<<<` herestring)

Fixes #7874.
2021-03-28 20:30:37 +02:00
ridiculousfish
e43913a547 Stop expanding globs in command position when performing error checking
Before running a command, or before importing a command from bash history,
we perform error checking. As part of error checking we expand commands
including variables and globs. If the glob is very large, like `/**`, then
we could hang expanding it.

One fix would be to limit the amount of expansion from the glob, but
instead let's just not expand command globs when performing error checking.

Fixes #7407
2020-12-22 12:38:51 -08:00
Johannes Altmanninger
e94b9ccf3e Do import bash history commands containing && or || 2019-11-07 23:33:35 +01:00
Kurtis Rader
6c4a51d56e improve bash history importing
Reject more invalid commands from the bash history file.

Fixes #3636
2017-05-20 21:03:31 -07:00
Kurtis Rader
0541a34201 improve bash command history importing
Fixes #2091
2017-02-08 20:50:57 -08:00
ridiculousfish
18f04adccb Support for importing fish 1.x's history and format, and also bash 2012-06-15 16:24:05 -07:00