1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-31 18:10:56 +01:00

overeagnerness to spot integers in cd after - and +

This commit is contained in:
Peter Stephenson 2008-03-02 21:21:52 +00:00
parent 5707bb5638
commit e5a6543e6d
2 changed files with 7 additions and 1 deletions

View file

@ -835,7 +835,8 @@ cd_get_dest(char *nam, char **argv, int hard, int func)
char *end;
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);
if (*end == '\0') {
if ((argv[0][0] == '+') ^ isset(PUSHDMINUS))