Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: backward-kill-shell-word widget



Sebastian Gniazdowski wrote on Sun, Jan 10, 2016 at 16:50:50 +0100:
> Hello
> How about such project?
> 
> https://github.com/psprint/zsh-editing-workbench
> 

Thank you for fixing the copyright header on zew-backward-kill-shell-word
to reflect that not all code in that file had been authored by me.

Since that file does have my name on it, though, I'd like to have an
explicit license statement on it.  I am releasing my version of that
function (the one I posted upthread) under the MIT license.  Would you
please update the file's header to reflect the license the file is under?

Regarding your change to use is-at-least: first, you should pass '-Uz'
to 'autoload'.  Second, I would use «case "$(zle -f 2>/dev/null)" in»
instead of is-at-least (functionality testing is better than
version-number testing).  I tested this method outside of widgets, not
inside widgets, but I expect it would work inside widgets as well.

You could do that test just once by defining the function as:
.
    % cat b-k-s-word
    case "$(zle -f 2>/dev/null)" in
      (*bad option*) _bksw_maybe_zle_dash_f() {};;
      (*not enough arguments for -f*) _bksw_maybe_zle_dash_f() { zle -f "$@" };;
      (*) abort;;
    esac
    b-k-s-word() {...}
    b-k-s-word
.
and then in b-k-s-word call _bksw_maybe_zle_dash_f instead of 'zle -f'.

> - all editing functionalities grasped by a group of people,
> configured, provided – sum of parts is more than set of parts, we will
> be able to obtain cool things and provide them in sane manner, with
> sane shortcuts etc.
> 
> If I'm to work alone on the project, I need at least your permission
> to use backward-kill-shell-word under GPLv3 and MIT. Can I please?

See above, I think my licensing it to you under MIT gives you what you
want.

Thanks for the invitation to work on the project, but it's not clear to
me what its scope is.  Improving shell-word widgets?  Providing
a configuration that prebinds various "kill-word under word-style X"
widgets?

I notice your default config sets a zstyle and a setopt, I think that's
exactly the sort of silent default that made oh-my-zsh unlikeable around
here.

Cheers,

Daniel



Messages sorted by: Reverse Date, Date, Thread, Author