fig icon indicating copy to clipboard operation
fig copied to clipboard

ssh has multiple option as same

Open iwecon opened this issue 3 years ago • 9 comments

Checks

  • [X] I have searched github.com/withfig/fig/issues and there are no duplicates of my issue
  • [X] I have run fig doctor in the affected terminal session
  • [X] I have run fig restart and replicated the issue again

Operating system

macOS 13.2.1 (22D68)

Expected behaviour

Only one option for each different IP for ssh root@.

Actual behaviour

After linking the same ssh several times, when I type ssh root@ again, the option multiple identical options appear: image

I checked ~/.ssh/known_hosts, and it is correct: Screenshot 2023-03-31 at 09 44 31

Steps to reproduce

Yes, it is easy to reproduce.

Just only need to link the same ssh multiple times.

Environment

fig-details:
  - 2.15.0
hardware-info:
  - model: 
  - model-id: 
  - chip-id: Apple M2
  - cores: 8
  - mem: 16.00 GB
os-info:
  - macOS 13.2.1 (22D68)
environment:
  - shell: /bin/zsh
  - terminal: iterm
  - cwd: /Users/i
  - exe-path: /opt/homebrew/bin/fig
  - install-method: brew
  - env-vars:
    - FIGTERM_SESSION_ID: 89b9b238-8876-48ad-8434-99fe1d4241c4
    - FIG_SET_PARENT_CHECK: 1
    - FIG_TERM: 2.15.0
    - PATH: /Users/i/.local/share/fig/plugins/git-open:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/i/.fig/bin:/Users/i/.local/bin
    - SHELL: /bin/zsh
    - TERM: xterm-256color
    - __CFBundleIdentifier: com.googlecode.iterm2
    - FIG_PID: 17099
    - FIG_SET_PARENT: 89b9b238-8876-48ad-8434-99fe1d4241c4

iwecon avatar Mar 31 '23 01:03 iwecon

Seems like we should filter duplicates here. I think this functionality may already exist but be disabled in certain cases? cc @fedeci

mschrage avatar May 01 '23 22:05 mschrage

It should be enabled when we have < 50 suggestions to dedupe. I'm checking later.

fedeci avatar May 02 '23 08:05 fedeci

Hi, these duplicates are becoming millioniplicate! I did a brief scroll to see how manyplicates servers are listed, didn't realise it would give my mouse scroll wheel a run for its money! 🖱️🤯

@fedeci I have a handful of ssh servers, lets say 4 or so, the listing for one of them alone is repeated way over 50 times...
I also did what @mschrage said in this issue, https://github.com/withfig/fig/issues/2319#issuecomment-1530747035. It did not remove any listing... Again more than happy manually delete any folders or files that you might believe might be causing this issue and feedback on this thread, so that hopefully you could diagnose the root cause.

P.S I have zero servers in my fig dashboard. However if I am to add servers, it successfully autodetects 4 servers from my ~/.ssh/known_hosts 🤷‍♂️

EmranMR avatar Jun 03 '23 19:06 EmranMR

I'm gonna check this!

fedeci avatar Jun 03 '23 19:06 fedeci

I'm gonna check this!

any joy?

stevesweets avatar Jun 19 '23 16:06 stevesweets

Also reproducing on my Mac

fernandodlhdt avatar Sep 08 '23 11:09 fernandodlhdt

Had this issue for many months, hoping for fix!

VityaSchel avatar Nov 23 '23 14:11 VityaSchel

Hi @fedeci, the various fixes suggested in the other ticket don't work. Can we do the deduplication locally until a fix is available?

YiannisDermitzakis avatar Dec 20 '23 05:12 YiannisDermitzakis

/cc @mschrage

fedeci avatar Dec 20 '23 06:12 fedeci