The startup_script feature ignores spaces
See original GitHub issueI tried to add a startup_script using the following code:
class MyCmd(Cmd):
def __init__():
Cmd.__init__(self, startup_script='/home/ubuntu/my folder/start.rc')
...
However, after debugging the code, it seems that cmd2 is considering that path as two separated elements: /home/ubuntu/my and `folder/start.rc’, and then of course the parsing fails when trying to see if that’s a real file, as I get the following error:
ERROR: /home/ubuntu/my does not exist or is not a file
Any help?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Trim trailing spaces in Xcode - Stack Overflow
Starting from Xcode 4.4 whitespaces will be trimmed automatically by default, unless the line is all whitespace. You can also activate Including ...
Read more >How to accept input with spaces from command line in bash ...
Currently I am having a bash script in which I accept input from the command line, but the input is with spaces and...
Read more >4. The Shell Startup Files - Using csh & tcsh [Book] - O'Reilly
The shell treats lines that begin with # as comments and ignores them. Use this feature to add comments that document your modifications....
Read more >How To Remove Spaces from a String In Python - DigitalOcean
Introduction. This tutorial provides examples of various methods you can use to remove whitespace from a string in Python.
Read more >Troubleshoot Storage Spaces Direct - Microsoft Learn
Run cluster validation and review the Storage Space Direct section, ensure the drives that will used for the cache are reported correctly and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Yup, came to the same conclusion myself and just pushed that fix 😉 PR coming shortly
@Den1al Thank you for reporting this. I was able to reproduce it and it is most certainly a bug. We will look into fixing it shortly.