Skip to content

Commit 5ceca08

Browse files
committed
Use -n behavior if guake is passed a path as a positional argument
1 parent 3a1ba26 commit 5ceca08

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

guake/main.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ def main():
7979

8080
# do not use version keywords here, pbr might be slow to find the version of Guake module
8181
parser = ArgumentParser()
82+
parser.add_argument(
83+
"path",
84+
nargs="?",
85+
help="Add a new tab at designated path when a path is provided and no other options",
86+
)
87+
8288
parser.add_argument(
8389
"-V",
8490
"--version",
@@ -517,6 +523,10 @@ def main():
517523
remote_object.add_tab(options.new_tab)
518524
only_show_hide = options.show
519525

526+
if options.path and len(sys.argv) == 2:
527+
remote_object.add_tab(os.path.abspath(options.path))
528+
only_show_hide = options.show
529+
520530
if options.select_tab:
521531
selected = int(options.select_tab)
522532
tab_count = int(remote_object.get_tab_count())
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
release_summary: >
2+
Open a new guake tab if guake is called with `guake [PATH]` and no other flags.
3+
4+
features:
5+
- |
6+
- Open a new guake tab if guake is called with `guake [PATH]` and no other flags.
7+
8+
fixes:
9+
- |
10+
- Linux mint 17.1 Cinnamon --> set Guake to current path when opened from within Nemo #424

0 commit comments

Comments
 (0)