Skip to content

Implement the use of & to background a command #716

Closed

Description

So we should implement it.

Activity

  1. andyleejordan commented on Mar 21, 2016

    @andyleejordan
    Member

    Like Bash's background job ampersand, or PowerShell's call operator ampersand? I thought we had the latter.

  2. added
    Usability(LEGACY) Helps filter issues that might be higher priority because they directly affect usability
    on Mar 21, 2016
  3. JamesWTruher commented on Mar 21, 2016

    @JamesWTruher
    Collaborator

    like Bash's; Today the token '&' at the end of a line results in the following:
    At line:1 char:4

    • ls &
    • ~
      The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
    • CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
    • FullyQualifiedErrorId : AmpersandNotAllowed

    However, I think that '&' on its own is not as interesting as real job control. It would be nice to take this opportunity to implement that :)

  4. andyleejordan commented on Mar 21, 2016

    @andyleejordan
    Member

    Ah, this isn't even supported in full PowerShell. Gotcha.

  5. modified the milestones: , v0.5.0 on May 9, 2016
  6. vors commented on May 15, 2016

    @vors
    Collaborator

    Fish-shell doesn't have this capability.
    Related issue in their repo fish-shell/fish-shell#563

  7. joeyaiello commented on May 16, 2016

    @joeyaiello
    Contributor

    Summary of UX sync discussion:

    • The complete solution Ctrl+Z, job control (fg/bg support) is an uncosted work item and can't be done by MVP (even though we'd absolutely like to do it eventually). Bruce Payette (@BrucePay) is going to cost the full work.
    • The full solution won't work on Windows (no SIGSTOP/SIGHUP).
    • If the uncosted "full solution" can't be done by MVP, one option is to just add some syntactic sugar that invokes Start-Process when the & is caught. This would also work on Windows
    • Another option is to change the current error thrown when a trailing & is used to tell the user to use Start-Process/start. This would also work on Windows.

    In the event that the uncosted work is too expensive, would either of these alternatives be acceptable for an MVP?

  8. andyleejordan commented on May 18, 2016

    @andyleejordan
    Member

    FWIW the latest insiders build of VS Code forks and execs properly, so it doesn't block the shell.

  9. 25 remaining items

  10. changed the title [-]I don't think PS can be a functional shell on Linux without implementing &[/-] [+]Implement the use of `&` to background a command[/+] on Mar 20, 2017
  11. modified the milestones: , 6.0.0-beta1, on May 8, 2017
  12. BrucePay commented on May 19, 2017

    @BrucePay
    Collaborator

    This has been merged #3360

  13. oising commented on May 20, 2017

    @oising
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions