Skip to content

funced : changed 'rm' to 'command rm' - #7826

Merged
faho merged 1 commit into
fish-shell:masterfrom
LPe7:master
Mar 15, 2021
Merged

faho merged 1 commit into
fish-shell:masterfrom
LPe7:master

Conversation

@LPe7

@LPe7 LPe7 commented Mar 15, 2021

Copy link
Copy Markdown
Contributor

Description

If rm is aliased to rm -i (ask before deleting) then rm will always ask to delete the cache file after funced edited the file, which is anoying. With this change, it won't be asking anymore. (This file is meant to be deleted at the end of funced so it's not a problem at all)

Tests

I made the exact same modifications in funced in my session and it worked perfectly.

if rm is aliased to 'rm -i' then rm will ask to delete the cache file after funced edited the file which is anoying
@faho
faho merged commit f95f12f into fish-shell:master Mar 15, 2021
@faho

faho commented Mar 15, 2021 •

Copy link
Copy Markdown
Member

Yeah, sure.

Note that you don't typically want to alias things with the same name. It's bad form and quite likely to cause problems like this (especially since fish doesn't distinguish between aliases and functions, and loads all configuration even in non-interactive shells!).

(honestly, just use an abbreviation - I have abbr rm 'rm -I', and it works as it should)

But in this case it's simple enough that we can just take the enhancement.

@faho faho added this to the fish 3.2.1 milestone Mar 15, 2021
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 12, 2021
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.

2 participants