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

Add the --succinct flag to type #6403

Merged
merged 4 commits into from
Dec 11, 2019
Merged

Add the --succinct flag to type #6403

merged 4 commits into from
Dec 11, 2019

Conversation

hivehand
Copy link
Contributor

Description

Add a new flag, -s/--succinct, to the type function: when used, it suppresses the expansion of function definitions normally performed by type <name> and type -a <name>.

Fixes issue #6402

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

@faho
Copy link
Member

faho commented Dec 10, 2019

This looks entirely reasonable, but I'd rename the flag to "--short".

@faho faho added this to the fish 3.1.0 milestone Dec 10, 2019
@hivehand
Copy link
Contributor Author

Thanks! I've changed "--succinct" to "--short". I've also added what I should have put there in the first place: functionality which, if the path to the function is known, prints it in parentheses, e.g.:

$ type -sa umask
umask is a function (defined in /usr/local/Cellar/fish/3.0.2/share/fish/functions/umask.fish)
umask is /usr/bin/umask

If the path isn't known, everything inside the parentheses is omitted.

@faho faho merged commit 16dc606 into fish-shell:master Dec 11, 2019
@faho
Copy link
Member

faho commented Dec 11, 2019

Nice work, merged, thanks!

@hivehand hivehand deleted the succinct branch December 12, 2019 01:18
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants