-
Notifications
You must be signed in to change notification settings - Fork 33
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
Feature/interactive aliases #154
Changes from 2 commits
02c5daf
f5c5fbc
0a30a44
0f292dd
6a6b99d
2034ce0
2674538
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,6 +203,7 @@ def unsatisfied_plugin_requirements(plugin): | |
"indicator_edit": "*", # Symbol to indicate an item will launch an editor | ||
"indicator_alias": "", # Symbol to indicate an aliased command | ||
"prompt": "Open:", # Prompt | ||
"interactive_shell": False, # Run commands in interactive mode | ||
} | ||
|
||
|
||
|
@@ -750,7 +751,10 @@ def execute(self, command, fork=None): | |
print("Command converted into:") | ||
print(command) | ||
|
||
return subprocess.call(command) | ||
if self.prefs["interactive_shell"] is True: | ||
shell = os.environ.get("SHELL", "/bin/bash") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I perfectly agree with you. Changed in 0a30a44 . |
||
command = shell + " -i -c " + " ".join(command) | ||
return subprocess.call(command, shell=self.prefs["interactive_shell"]) | ||
|
||
def cache_regenerate(self, message=True): | ||
if message: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the comment, how about "Run commands in an interactive shell session".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in 0a30a44 .