Re: [RFC PATCH 1/1] completion: load completion file for external subcommand

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Florian Gamböck <mail@xxxxxxxx> writes:

> On 2018-04-09 18:36, Junio C Hamano wrote:
>> Florian Gamböck <mail@xxxxxxxx> writes:
>>
>> > Good point. I could go even further and ditch the if-construct:
>> >
>> >    ! declare -f $completion_func && declare -f __load_completion &&
>> >        __load_completion "git-$command"
>>
>> I personally find that a lot harder to read than if/then/fi.
> ...
> Does my reasoning make sense?

Not at all.  But ...

> I mean, the result will be exactly the same, we are clearly only
> talking about readability here.

... I agree, and I also think the "readability" is not absolute
anyway.

FWIW, personally I'd find "if $completion_func does not yet exist
and a way to dynload stuff exists, then use that way to load it from
an external file" the most natural way to express what you are
doing.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux