Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve support for Alfred #348

Closed
2 of 5 tasks
denisidoro opened this issue Apr 19, 2020 · 8 comments
Closed
2 of 5 tasks

Improve support for Alfred #348

denisidoro opened this issue Apr 19, 2020 · 8 comments
Labels
help wanted Extra attention is needed new feature New feature or request

Comments

@denisidoro
Copy link
Owner

denisidoro commented Apr 19, 2020

  • multiline snippets
  • better handle .bashrc
  • variables without suggestions
  • --map and --column
  • launch terminal for snippets with no effect otherwise
@denisidoro denisidoro added bug Something isn't working new feature New feature or request and removed bug Something isn't working labels Apr 19, 2020
@denisidoro denisidoro added the help wanted Extra attention is needed label May 12, 2020
@perfectayush
Copy link

Hi, thanks for navi. I had a suggestion here, not sure sure if it's supported yet.
It will be helpful to copy the snippet in clipboard, and paste it in underlying application, instead of executing it (in terminal).

@bloatfan
Copy link

bloatfan commented Sep 9, 2020

Hi, thanks for navi. I had a suggestion here, not sure sure if it's supported yet.
It will be helpful to copy the snippet in clipboard, and paste it in underlying application, instead of executing it (in terminal).

@perfectayush

you can add a output Copy to Clipboard, and settings Automatically paste to front most app, like this

image

@perfectayush
Copy link

@lslz627 Thanks, I can modify that. Checking if upstream workflow will support it. It would be great if I don't have to maintain this, other folks can use it as well.

@denisidoro
Copy link
Owner Author

@perfectayush did you manage to make it work? If so, would you mind opening a PR? I can then maintain it 👍

@perfectayush
Copy link

perfectayush commented Sep 15, 2020

@denisidoro the solution recommended by @lslz627 works. But it will break the existing terminal command workflow. I am not sure what would be the best way to do this in final terminal/else switch.

@denisidoro
Copy link
Owner Author

Unfortunately I don't have any metrics regarding navi's usage but I bet that, relatively speaking, few people use this Alfred workflow (because it's experimental and hacky).

I'm OK with breaking changes if they are for the greater good.

@perfectayush
Copy link

@denisidoro I personally feel that best course would be to copy the command to clipboard and paste it in front most app. This is very useful for pasting the command in terminal or a text editor. This also allows for inspecting command before running it. Running it in terminal once evaluated or eval "$(snippet)" is probably not a great idea without user inspection.

From usage point of view, I have also added a hotkey in the beginning to initiate this workflow. I prefer command + shift + ;. But ppl can bind this to their own preference.

image

I have exported the workflow, I will add a PR if this is acceptable.

@denisidoro
Copy link
Owner Author

denisidoro commented Apr 15, 2021

Unfortunately, I'm dropping support for Alfred in #509.

Reasons:

  • it doesn't work as expected in many scenarios (cheats with --map, for example)
  • info which would be available in the fzf preview-window isn't shown in Alfred, at least not fully
  • Alfred code makes refactoring navi difficult
  • if I decide to give proper support for the Alfred workflow in the future, I'll need to rewrite the code from scratch, anyway
  • I personally don't use the workflow anymore - instead, I'm launching an alacritty window with dash -c navi for low latency

Any additional info related to Alfred will be documented in this page.

I'm sorry for all navi+Alfred users out there!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed new feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants