diff options
author | tdro <tdro@users.noreply.github.com> | 2020-08-08 22:19:29 -0400 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2020-08-08 22:19:29 -0400 |
commit | 87ffadcd991f529d27870168e97ade7b48efe92c (patch) | |
tree | 82179eb582f4241098fb796056480b3f07c4e669 /.local | |
parent | 33973861fda65c38a88f1371a094a24f5a395b68 (diff) | |
download | dotfiles-87ffadcd991f529d27870168e97ade7b48efe92c.tar.gz dotfiles-87ffadcd991f529d27870168e97ade7b48efe92c.tar.bz2 dotfiles-87ffadcd991f529d27870168e97ade7b48efe92c.zip |
.local/bin/fzf-file-mark: Sort
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/fzf-file-mark | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/.local/bin/fzf-file-mark b/.local/bin/fzf-file-mark index 8a306c6..94c2bf8 100755 --- a/.local/bin/fzf-file-mark +++ b/.local/bin/fzf-file-mark @@ -1,9 +1,11 @@ #!/bin/sh -file=$HOME/Documents/.fzf-fmarks +file=$FZF_FILE_MARKS temp=/tmp/.fzf-fmarks.tmp realpath "$1" && realpath "$1" >> "$file"; sed -i "s|$HOME|~|g" "$file"; -awk '!visited[$0]++' "$file" > "$temp"; -mv -f "$temp" "$file"; +awk '!visited[$0]++' "$file" > "$temp" \ + && sort "$temp" > "$file"; + +rm -f "$temp"; |