twd-m4sc0 1.5.3__tar.gz → 1.5.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: twd_m4sc0
3
- Version: 1.5.3
3
+ Version: 1.5.4
4
4
  Summary: A tool to temporarily save and go to a working directory
5
5
  Home-page: https://github.com/m4sc0/twd
6
6
  Author: m4sc0
@@ -36,8 +36,10 @@ pip install twd-m4sc0
36
36
 
37
37
  2. Add the following line to your `.bashrc` or `.zshrc` to set up the shell function:
38
38
 
39
+ > Since 1.5.4 you can also set a different command for the `twd` program by replacing `[alias]` in the following code by your custom alias
40
+
39
41
  ```bash
40
- eval $(python3 -m twd --shell)
42
+ eval $(python3 -m twd --shell [alias])
41
43
  ```
42
44
 
43
45
  3. Exit and reopen the terminal or reload using:
@@ -23,8 +23,10 @@ pip install twd-m4sc0
23
23
 
24
24
  2. Add the following line to your `.bashrc` or `.zshrc` to set up the shell function:
25
25
 
26
+ > Since 1.5.4 you can also set a different command for the `twd` program by replacing `[alias]` in the following code by your custom alias
27
+
26
28
  ```bash
27
- eval $(python3 -m twd --shell)
29
+ eval $(python3 -m twd --shell [alias])
28
30
  ```
29
31
 
30
32
  3. Exit and reopen the terminal or reload using:
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="twd_m4sc0",
5
- version="1.5.3",
5
+ version="1.5.4",
6
6
  packages=find_packages(),
7
7
  entry_points={
8
8
  "console_scripts": [
@@ -288,7 +288,7 @@ def main():
288
288
  )
289
289
  parser.add_argument("-f", "--force", action="store_true", help="Force an action")
290
290
  parser.add_argument(
291
- "--shell", action="store_true", help="Output shell function for integration"
291
+ "--shell", nargs="?", const="twd", help="Output shell function for integration"
292
292
  )
293
293
  parser.add_argument(
294
294
  "--simple-output",
@@ -306,8 +306,8 @@ def main():
306
306
  simple_output = args.simple_output
307
307
 
308
308
  if args.shell:
309
- print(r"""
310
- function twd() {
309
+ print(rf"""
310
+ function {args.shell}() {{
311
311
  output=$(python3 -m twd "$@");
312
312
  while IFS= read -r line; do
313
313
  if [[ -z "$line" ]]; then
@@ -321,7 +321,7 @@ def main():
321
321
  echo "$message";
322
322
  fi;
323
323
  done <<< "$output";
324
- }
324
+ }}
325
325
  """)
326
326
  return 0
327
327
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: twd_m4sc0
3
- Version: 1.5.3
3
+ Version: 1.5.4
4
4
  Summary: A tool to temporarily save and go to a working directory
5
5
  Home-page: https://github.com/m4sc0/twd
6
6
  Author: m4sc0
@@ -36,8 +36,10 @@ pip install twd-m4sc0
36
36
 
37
37
  2. Add the following line to your `.bashrc` or `.zshrc` to set up the shell function:
38
38
 
39
+ > Since 1.5.4 you can also set a different command for the `twd` program by replacing `[alias]` in the following code by your custom alias
40
+
39
41
  ```bash
40
- eval $(python3 -m twd --shell)
42
+ eval $(python3 -m twd --shell [alias])
41
43
  ```
42
44
 
43
45
  3. Exit and reopen the terminal or reload using:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes