Code Monkey home page Code Monkey logo

Comments (10)

PauloPhagula avatar PauloPhagula commented on June 16, 2024 1

Tested and Confirmed. The change above fixed the issue.
Thanks

from fzf-filemru.

tweekmonster avatar tweekmonster commented on June 16, 2024

Thanks @dareenzo, this appears to be related to #4. I think I understand this problem now since you specifically mentioned MacOS. The script that generates the file list uses echo -e and it looks like the -e flag isn't POSIX and not available in the MacOS echo command.

This should print git in yellow in your MacOS terminal:

printf "\e[38;5;3mgit\e[m\n"

I'll update the script to use printf instead.

from fzf-filemru.

tweekmonster avatar tweekmonster commented on June 16, 2024

This should now be fixed in d76b2ea

from fzf-filemru.

dylan-chong avatar dylan-chong commented on June 16, 2024

@dareenzo May i ask how you got this plugin to setup on mac os? On my setup it does not show the most recent files, just the list of files in the current directory

nnoremap F :FilesMru --tiebreak=end

from fzf-filemru.

dylan-chong avatar dylan-chong commented on June 16, 2024

@dareenzo May i ask how you got this plugin to setup on mac os? On my setup it does not show the most recent files, just the list of files in the current directory

nnoremap F :FilesMru --tiebreak=end

from fzf-filemru.

dylan-chong avatar dylan-chong commented on June 16, 2024

@dareenzo May i ask how you got this plugin to setup on mac os? On my setup it does not show the most recent files, just the list of files in the current directory

nnoremap F :FilesMru --tiebreak=end

from fzf-filemru.

PauloPhagula avatar PauloPhagula commented on June 16, 2024

I got it like below, and I'm sharing between Linux and MacOS

nnoremap <c-p> :ProjectMru --tiebreak=end<CR>
let g:fzf_filemru_bufwrite = 1
let g:fzf_filemru_git_ls = 1
let g:fzf_filemru_ignore_submodule = 1

from fzf-filemru.

dylan-chong avatar dylan-chong commented on June 16, 2024

Interesting. When i bring up the menu i get this which is just a list of all the project files without any of the most recent ones
screen shot 2018-10-23 at 7 33 28 am

Just looking at the readme, tdid you have to set XDG_CACHE_HOME ?

from fzf-filemru.

PauloPhagula avatar PauloPhagula commented on June 16, 2024

Now that you mention it, I checked again and you're right. I don't get the MRU either on Mac. I get it only on Linux.

I do have a file and a folder created at ~/.cache related to MRU (fzf_filemru, fzf_mru), but I don't have the XDG_CACHE_HOME variable set.

Probably @tweekmonster can clarify more on the setup requirements.

from fzf-filemru.

tweekmonster avatar tweekmonster commented on June 16, 2024

@dylan-chong @dareenzo The script will sort out the paths if that variable isn't set. The actual problem is that POSIX awk doesn't support the systime() call https://github.com/tweekmonster/fzf-filemru/blob/master/bin/filemru.sh#L43
gawk supports systime(), so I made it a "requirement", but I didn't really like it at the time. I recently noticed the issue myself since I upgraded my laptop but didn't install gawk.

This should fix the issue:

diff --git a/bin/filemru.sh b/bin/filemru.sh
index 541437d..3914b98 100755
--- a/bin/filemru.sh
+++ b/bin/filemru.sh
@@ -42,3 +42,3 @@ update_mru() {
     BEGIN {
-      ts = systime()
+      ts = '$(date +%s)'
       ts -= (ts % 120)

The problem with this is that the POSIX date program doesn't support the +%s format. It works with GNU date on Linux and in MacOS's non-GNU date, so that's probably enough for now since I'm still unable to find a fast and reliable way to get a unix timestamp from bash using only POSIX programs.

from fzf-filemru.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.