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

Re: umount /f/b<TAB> -> /foo/bar



On Aug 19,  3:56pm, Daniel Shahaf wrote:
}
} +    # This codepath honours any -M matchspec parameters.
} +    () {
} +      local -a tmp_buffer
} +      compadd -A tmp_buffer "$__gopts[@]" -a files
} +      matches+=( "${(@)tmp_buffer/$canpref/$origpref}" )
} +    }
} +  else
} +    # ### Ideally, this codepath would do what the 'if' above does,
} +    # ### but telling compadd to pretend the "word on the command line"
} +    # ### is ${"the word on the command line"/$origpref/$canpref}.
} +    matches+=(${${(M)files:#$canpref*}/$canpref/$origpref})
} +  fi

Perhaps some variation on

    compadd -M "B:${(b)origpref}=${(b)canpref}" -a files

??  Some cases of mount point names containing unusual characters might
be a little weird.



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