Use xdg-open in Linux for the o alias, if it's available. #1478

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
@gokceneraslan

No description provided.

@gokceneraslan

This comment has been minimized.

Show comment
Hide comment

Ping?

@mcornella

This comment has been minimized.

Show comment
Hide comment
@mcornella

mcornella May 27, 2014

Collaborator

Hi! Please be aware that you're defining the alias outside the check for fasd installed, and that by making the alternative condition only on Darwin you're essentially leaving all the other systems that are not Linux nor Darwin without a defined alias.
For (1), put the if inside the check again; for (2), convert your elif into an else.

Collaborator

mcornella commented May 27, 2014

Hi! Please be aware that you're defining the alias outside the check for fasd installed, and that by making the alternative condition only on Darwin you're essentially leaving all the other systems that are not Linux nor Darwin without a defined alias.
For (1), put the if inside the check again; for (2), convert your elif into an else.

@gokceneraslan

This comment has been minimized.

Show comment
Hide comment
@gokceneraslan

gokceneraslan May 27, 2014

(1) I don't get (1). if-elif-fi block that I added is already within if-fi block of 'fasd' check, isn't it?
(2) Is there an "open" command that opens files in "all the other systems that are not Linux nor Darwin"? open is an OS X command, right? So why do you want me to define an alias to "open" for those systems?

(1) I don't get (1). if-elif-fi block that I added is already within if-fi block of 'fasd' check, isn't it?
(2) Is there an "open" command that opens files in "all the other systems that are not Linux nor Darwin"? open is an OS X command, right? So why do you want me to define an alias to "open" for those systems?

@mcornella

This comment has been minimized.

Show comment
Hide comment
@mcornella

mcornella May 27, 2014

Collaborator

(1) I don't get (1). if-elif-fi block that I added is already within if-fi block of 'fasd' check, isn't it?

It is indeed inside the fasd check, I probably had a brainfart looking at the diff 😄

Regarding the alternative alias, I think OpenBSD also has an open command that does that, and then there is Windows / Cygwin. Other plugins do these kind of check as well, such as jira, node and web-search. Also #1039

I don't know the right approach anyway, what do you say?

Collaborator

mcornella commented May 27, 2014

(1) I don't get (1). if-elif-fi block that I added is already within if-fi block of 'fasd' check, isn't it?

It is indeed inside the fasd check, I probably had a brainfart looking at the diff 😄

Regarding the alternative alias, I think OpenBSD also has an open command that does that, and then there is Windows / Cygwin. Other plugins do these kind of check as well, such as jira, node and web-search. Also #1039

I don't know the right approach anyway, what do you say?

@mcornella

This comment has been minimized.

Show comment
Hide comment
@mcornella

mcornella Feb 10, 2015

Collaborator

Hi @gokceneraslan, it's been a long time but I managed to find a clean and simple solution, look at the web-search plugin to safely open across different platforms.
What do you say if I put that into a lib file so we can use it across the project?

Collaborator

mcornella commented Feb 10, 2015

Hi @gokceneraslan, it's been a long time but I managed to find a clean and simple solution, look at the web-search plugin to safely open across different platforms.
What do you say if I put that into a lib file so we can use it across the project?

@gokceneraslan

This comment has been minimized.

Show comment
Hide comment
@gokceneraslan

gokceneraslan Feb 14, 2015

Looks very similar to my patch :) Go go go...

Looks very similar to my patch :) Go go go...

@mcornella

This comment has been minimized.

Show comment
Hide comment
@mcornella

mcornella Aug 4, 2015

Collaborator

Hi @gokceneraslan, I finally implemented my standard open command. Now the o alias is a -e open_command, where open_command is the implemented function.

Please test if it works correctly since I don't have fasd to check.
Cheers!

Collaborator

mcornella commented Aug 4, 2015

Hi @gokceneraslan, I finally implemented my standard open command. Now the o alias is a -e open_command, where open_command is the implemented function.

Please test if it works correctly since I don't have fasd to check.
Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment