Skip to content

Commit

Permalink
Use -n behavior if guake is passed a path as a positional argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidy22 committed May 12, 2023
1 parent 3a1ba26 commit 5ceca08
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions guake/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ def main():

# do not use version keywords here, pbr might be slow to find the version of Guake module
parser = ArgumentParser()
parser.add_argument(
"path",
nargs="?",
help="Add a new tab at designated path when a path is provided and no other options",
)

parser.add_argument(
"-V",
"--version",
Expand Down Expand Up @@ -517,6 +523,10 @@ def main():
remote_object.add_tab(options.new_tab)
only_show_hide = options.show

if options.path and len(sys.argv) == 2:
remote_object.add_tab(os.path.abspath(options.path))
only_show_hide = options.show

if options.select_tab:
selected = int(options.select_tab)
tab_count = int(remote_object.get_tab_count())
Expand Down
10 changes: 10 additions & 0 deletions releasenotes/notes/positional_path-0b30f1f71c869adf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
release_summary: >
Open a new guake tab if guake is called with `guake [PATH]` and no other flags.
features:
- |
- Open a new guake tab if guake is called with `guake [PATH]` and no other flags.
fixes:
- |
- Linux mint 17.1 Cinnamon --> set Guake to current path when opened from within Nemo #424

0 comments on commit 5ceca08

Please sign in to comment.