Tag Info

Hot answers tagged

3

This feature can be tuned with ZLE_REMOVE_SUFFIX_CHARS and ZLE_SPACE_SUFFIX_CHARS shell parameters. If the ZLE_REMOVE_SUFFIX_CHARS variable is set, it should contain a set of characters that, when typed, will cause automatic suffixes from the completion to be removed. If ZLE_REMOVE_SUFFIX_CHARS is unset, the default behaviour equates to ...


2

Use an array since that can expand to a variable number of arguments: #!/bin/bash # This is file caller.bash switch=() if [[ ${1-x} == x ]] then switch=("--abc=long argument") fi some_command.sh "--exclude=*~" "${switch[@]}" arg Or you could use the ${var+...} syntax: #!/bin/sh # This is file caller.sh unset switch if [ "${1-x}" = x ] then ...


1

You basically already know the answer from here. It's quite easy to put this all together like this: function insert_files() { vifm -f < /dev/tty > /dev/tty while read l; do LBUFFER+="'$l' " done < ~/.vifm/vimfiles zle reset-prompt } zle -N insert_files bindkey '^t' insert_files I'm not a zsh-user, so I stole structure ...



Only top voted, non community-wiki answers of a minimum length are eligible