Repository navigation
Commit 2e066b7
committed
Stop resolving PATH entries and fold shell marking into one helper
os.path.realpath() can raise for a PATH entry which can't be reached, such
as one on an unavailable network share on Windows. Since find_editor() runs
when cmd2 is imported, that could keep cmd2 from being imported. The PATH
entries are now used as written. Executable names were already
de-duplicated, so the only cost is searching a directory twice when it is
listed under two names.
The places which mark completions as being passed to a shell now share one
helper, Cmd._for_shell().
Corrected the docs for how the quote character is chosen when several
matches are offered, and documented that a macro which runs a shell
command is not quoted for the shell.1 parent 19d9a46 commit 2e066b7
4 files changed
Lines changed: 48 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2581 | 2581 | | |
2582 | 2582 | | |
2583 | 2583 | | |
2584 | | - | |
2585 | | - | |
2586 | | - | |
2587 | | - | |
2588 | | - | |
2589 | | - | |
2590 | | - | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
2591 | 2588 | | |
2592 | 2589 | | |
2593 | 2590 | | |
| |||
5054 | 5051 | | |
5055 | 5052 | | |
5056 | 5053 | | |
| 5054 | + | |
| 5055 | + | |
| 5056 | + | |
| 5057 | + | |
| 5058 | + | |
| 5059 | + | |
| 5060 | + | |
| 5061 | + | |
5057 | 5062 | | |
5058 | 5063 | | |
5059 | | - | |
5060 | | - | |
| 5064 | + | |
5061 | 5065 | | |
5062 | 5066 | | |
5063 | 5067 | | |
5064 | | - | |
5065 | | - | |
| 5068 | + | |
5066 | 5069 | | |
5067 | 5070 | | |
5068 | 5071 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
383 | | - | |
384 | | - | |
| 382 | + | |
| 383 | + | |
385 | 384 | | |
386 | 385 | | |
387 | 386 | | |
388 | 387 | | |
389 | | - | |
390 | | - | |
391 | | - | |
| 388 | + | |
392 | 389 | | |
393 | 390 | | |
394 | 391 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
72 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2094 | 2094 | | |
2095 | 2095 | | |
2096 | 2096 | | |
2097 | | - | |
2098 | | - | |
2099 | | - | |
2100 | | - | |
2101 | | - | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
2102 | 2114 | | |
2103 | 2115 | | |
2104 | 2116 | | |
| |||
0 commit comments