Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix pushd's behavior with invalid arguments #6947

Merged
merged 1 commit into from
Apr 26, 2020
Merged

fix pushd's behavior with invalid arguments #6947

merged 1 commit into from
Apr 26, 2020

Conversation

LawAbidingCactus
Copy link
Contributor

@LawAbidingCactus LawAbidingCactus commented Apr 26, 2020

Description

pushd currently adds $PWD to $dirstack without checking whether the directory change was successful. For example, pushd ~/.config/fish/config.fish from ~ will add prepend ~ to $dirstack, even though pushd was given an invalid argument. This also applies to directories the user may not have permission to cd into. The change in question fixes this.

TODOs:

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.md

share/functions/pushd.fish Outdated Show resolved Hide resolved
Copy link
Member

@faho faho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not call fish

@faho faho added the bug Something that's not working as intended label Apr 26, 2020
@faho faho added this to the fish 3.2.0 milestone Apr 26, 2020
share/functions/pushd.fish Outdated Show resolved Hide resolved
share/functions/pushd.fish Outdated Show resolved Hide resolved
@faho faho merged commit ad677d3 into fish-shell:master Apr 26, 2020
@faho
Copy link
Member

faho commented Apr 26, 2020

Yeah, that'll do. Thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants