mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 08:58:01 +00:00
fish.rs: fix regression in fish_xdm_login_hack_hack_hack_hack
This is off by one from the C++ version. It wasn't super obvious why this worked in the first place. Looks like args[0] is "-" because we are invoked like fish -c 'exec "${@}"' - "${@}" and it looks like "-" is treated like "--" by bash, so we emulate that. See https://github.com/fish-shell/fish-shell/issues/367#issuecomment-11740812
This commit is contained in:
parent
b8c5627eb1
commit
773a507b01
1 changed files with 1 additions and 1 deletions
|
@ -856,7 +856,7 @@ fn fish_xdm_login_hack_hack_hack_hack(cmds: &mut Vec<OsString>, args: &[&wstr])
|
|||
// We're going to construct a new command that starts with exec, and then has the
|
||||
// remaining arguments escaped.
|
||||
let mut new_cmd = OsString::from("exec");
|
||||
for arg in args {
|
||||
for arg in &args[1..] {
|
||||
new_cmd.push(" ");
|
||||
new_cmd.push(escape_single_quoted_hack_hack_hack_hack(arg));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue