Merge branch 'release/5.0.1'

This commit is contained in:
Chris Down 2018-02-21 17:37:15 +00:00
commit da2e4dcf0f
3 changed files with 7 additions and 5 deletions

View file

@ -1,5 +1,7 @@
clipmenu is a simple clipboard manager using [dmenu][] (or [rofi][]) and [![Tests](https://img.shields.io/travis/cdown/clipmenu/develop.svg)](https://travis-ci.org/cdown/clipmenu)
[xsel][].
clipmenu is a simple clipboard manager using [dmenu][] (or [rofi][] with
`CM_LAUNCHER=rofi`) and [xsel][].
# Demo # Demo

View file

@ -35,8 +35,8 @@ fi
# argument to override an earlier one. That is, if the user passes in `-l`, our # argument to override an earlier one. That is, if the user passes in `-l`, our
# one will be ignored. # one will be ignored.
chosen_line=$( chosen_line=$(
cat "$cache_file_prefix"_* /dev/null | sort -rnk 1 | cut -d' ' -f2- | cat "$cache_file_prefix"_* /dev/null | LC_ALL=C sort -rnk 1 |
awk '!seen[$0]++' | "$CM_LAUNCHER" -l 8 "$@" cut -d' ' -f2- | awk '!seen[$0]++' | "$CM_LAUNCHER" -l 8 "$@"
) )
[[ $chosen_line ]] || exit 1 [[ $chosen_line ]] || exit 1

View file

@ -190,7 +190,7 @@ while true; do
# Without checking ${last_data[any]}, we often double write since both # Without checking ${last_data[any]}, we often double write since both
# selections get the same content # selections get the same content
cache_file_output="$(date +%s) $first_line" cache_file_output="$(date +%s%N) $first_line"
if [[ ${last_data[any]} != "$data" ]]; then if [[ ${last_data[any]} != "$data" ]]; then
filename="$cache_dir/$(cksum <<< "$first_line")" filename="$cache_dir/$(cksum <<< "$first_line")"
debug "Writing $data to $filename" debug "Writing $data to $filename"