This is my first pull request (following the new issue I created on 05/01/2022 requesting the feature), so I hope it's in good order. I explained the new feature in the updated README.md
At one point I accidentally overwrote the file sh/tmuxcomplete with an altered copy, so now it's showing that all the lines were changed. I actually only altered two functions and added a new option flag -t in the getopts loop. Below I just show the additional lines:
TARGET='-1'
while getopts enp:s:t:l:c:g: name
do case $name in
t) TARGET="$OPTARG";;
*) echo "Usage: $0 [-t <pane_index>] [-p pattern] [-s splitmode] [-l listargs] [-c captureargs] [-g grepargs]\n"
exit 2;;
esac
done
and the two functions in they're entirety (the new part is the elif):
excludecurrent() {
if [ "$EXCLUDE" = "1" ]; then
currentpane=$(tmux display-message -p '11-#{session_id} ')
# echo 1>&2 'current' "$currentpane"
# use -F to match $ in session id
grep -v -F "$currentpane"
elif ! [ "$TARGET" = "-1" ]; then
echo $(tmux display-message -p '01-#{session_id} ')$TARGET
else
cat
fi
}
and (the new part is that uniq is changed to cat:
sortu() {
if [ "$NOSORT" = "1" ]; then
cat
else
sort -u
fi
}
Please let me know if this feature is of interest/within the scope of the plugin, and if there's anymore I should do.
This is my first pull request (following the new issue I created on 05/01/2022 requesting the feature), so I hope it's in good order. I explained the new feature in the updated README.md
At one point I accidentally overwrote the file sh/tmuxcomplete with an altered copy, so now it's showing that all the lines were changed. I actually only altered two functions and added a new option flag
-t
in thegetopts
loop. Below I just show the additional lines:and the two functions in they're entirety (the new part is the
elif
):and (the new part is that
uniq
is changed tocat
:Please let me know if this feature is of interest/within the scope of the plugin, and if there's anymore I should do.