mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-18 15:21:16 +02:00
overeagnerness to spot integers in cd after - and +
This commit is contained in:
parent
5707bb5638
commit
e5a6543e6d
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2008-03-02 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||||
|
|
||||||
|
* 24656: Src/builtin.c: fix cd overeagerness to find integers
|
||||||
|
after "-" and "+".
|
||||||
|
|
||||||
2008-03-01 Clint Adams <clint@zsh.org>
|
2008-03-01 Clint Adams <clint@zsh.org>
|
||||||
|
|
||||||
* 24650: Completion/Unix/Type/_path_commands: use zstyle -t instead
|
* 24650: Completion/Unix/Type/_path_commands: use zstyle -t instead
|
||||||
|
|
|
@ -835,7 +835,8 @@ cd_get_dest(char *nam, char **argv, int hard, int func)
|
||||||
char *end;
|
char *end;
|
||||||
|
|
||||||
doprintdir++;
|
doprintdir++;
|
||||||
if (argv[0][1] && (argv[0][0] == '+' || argv[0][0] == '-')) {
|
if (argv[0][1] && (argv[0][0] == '+' || argv[0][0] == '-')
|
||||||
|
&& strspn(argv[0]+1, "0123456789") == strlen(argv[0]+1)) {
|
||||||
dd = zstrtol(argv[0] + 1, &end, 10);
|
dd = zstrtol(argv[0] + 1, &end, 10);
|
||||||
if (*end == '\0') {
|
if (*end == '\0') {
|
||||||
if ((argv[0][0] == '+') ^ isset(PUSHDMINUS))
|
if ((argv[0][0] == '+') ^ isset(PUSHDMINUS))
|
||||||
|
|
Loading…
Reference in a new issue