Windows์์ ์ผ๋ฐ์ ์ธ autojump ๋ช ๋ น์ ์คํํ๋ฉด ๋ค์๊ณผ ๊ฐ์ด ๋ฉ๋๋ค.
Traceback (most recent call last):
File "C:\Program Files (x86)\CowShell\Vendor\AutoJump\bin\\autojump", line 320, in <module>
sys.exit(main(parse_arguments()))
File "C:\Program Files (x86)\CowShell\Vendor\AutoJump\bin\\autojump", line 314, in main
['.'])))
File "C:\Program Files (x86)\CowShell\Vendor\AutoJump\bin\autojump_utils.py", line 42, in first
return it.next()
File "C:\Program Files (x86)\CowShell\Vendor\AutoJump\bin\autojump_match.py", line 86, in <lambda>
flags=regex_flags,
File "F:\Programs\Python\lib\re.py", line 146, in search
return _compile(pattern, flags).search(string)
File "F:\Programs\Python\lib\re.py", line 251, in _compile
raise error, v # invalid expression
sre_constants.error: unexpected end of regular expression
ECHO is off.
๊ฐ์กฐ ํ์๋ ๋ณ๊ฒฝ ์ฌํญ: https://github.com/wting/autojump/commit/7c7865ea7ecfd937284f774fb0818c5cc10c340a#diff -4b97c2fd2ae952c567c1646bc80e5d43L78
Windows ์์คํ
์ ๊ธฐ๋ฅ ์ฅ์ ๋ก ์ด์ด์ง๋๋ค.
์ ์๋ ์๋ฃจ์ ์ ๊ธฐ๋ณธ์ ์ผ๋ก autojump_match.py์ 78-80ํ์ ๋ค์๊ณผ ๊ฐ์ด ๋ณ๊ฒฝํ๋ ๊ฒ์ ๋๋ค.
sep = '\\\\' if os.sep == '\\' else os.sep
regex_no_sep = '[^' + sep + ']*'
regex_no_sep_end = regex_no_sep + '$'
regex_one_sep = regex_no_sep + sep + regex_no_sep
(regex ๊ตฌ์ฑ์ ์ฌ์ฉ๋๋ ๊ตฌ๋ถ ๊ธฐํธ ๊ฐ์ ์กฐ๊ฑด๋ถ๋ก ์ค์ )
์์ธํ ๋ฒ๊ทธ ๋ณด๊ณ ์ ๊ฐ์ฌํฉ๋๋ค!
๋ถํํ๋ ๋๋ Windows ์ปดํจํฐ์ ์ก์ธ์คํ ์ ์์ต๋๋ค. ์ค๋ฅ๋ฅผ ์ฌํํ๋๋ก ์ด๋ฌํ Windows ํ ์คํธ ๋ฅผ ์ ๋ฐ์ดํธํ ์ ์์ต๋๊น? ๊ทธ๋ ๊ฒ ํ๋ฉด ๋ฏธ๋์ ํ๊ท ๋ฒ๊ทธ๋ฅผ ๋ฐฉ์งํ ์ ์์ต๋๋ค.
Win10์์ ์๋ ์ ํ๋ฅผ ์๋ํ๊ณ ์ด๊ฒ์ ๋๋ฅด์ญ์์ค. ์ ์๋ ํจ์น๊ฐ ํจ๊ณผ๊ฐ ์๋ ๊ฒ ๊ฐ์ต๋๋ค.
@wting ํ
์คํธ๊ฐ ์ค์ ๋ก Windows์์ ์คํ๋์ง ์์ผ๋ฉด match_consecutive ํ
์คํธ๊ฐ ์๋ชป๋ os.sep
์์ต๋๊น? os.sep๊ฐ ๋ฐฑ์ฌ๋์๊ฐ ์๋๋ฉด ํ
์คํธ๊ฐ ์ค์ ๋ก ์คํจํ์ง ์์ต๋๋ค.
๋ค์๊ณผ ๊ฐ์ ํ ์คํธ๋ฅผ ์ํด ์กฐ๋กฑํ ์ ์์ต๋๋ค.
In [1]: import os, mock
In [2]: os.sep
Out[2]: '/'
In [3]: with mock.patch.object(os, 'sep', '\\'):
...: print(os.sep)
...:
\
๋๋ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์๊ณ ์ ์ ๋ ์์ ์ฌํญ์ผ๋ก ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋์์ต๋๋ค. ๋์ ์๋ฃจ์ ์ appveyor์ ๊ฐ์ Windows CI ํ๋ซํผ์์ ํ ์คํธ๋ฅผ ์คํํ๋ ๊ฒ์ ๋๋ค.
10 64์น, ๊ฐ์ ๋ฌธ์ ์ ๋๋ค. autojump_match.py โโ๋ณ๊ฒฝ์ด ์๋ํ์ต๋๋ค. ๊ฐ์ฌ ํด์.
Window 10 Professional, ์ค๋ ์ด ๋ฌธ์ ๋ฅผ ๋ง๋ฌ์ต๋๋ค.... ์ ์๋ ํจ์น๊ฐ ๋งค๋ ฅ์ฒ๋ผ ์๋ํฉ๋๋ค! ๊ฐ์ฌํฉ๋๋ค. 4๋ ์ด ์ง๋๋ ํจ์น๊ฐ ๋ง์คํฐ์ ๋ณํฉ๋์ง ์๋ ์ด์ ๊ฐ ๋ฌด์์ธ์ง ๊ถ๊ธํฉ๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
Window 10 Professional, ์ค๋ ์ด ๋ฌธ์ ๋ฅผ ๋ง๋ฌ์ต๋๋ค.... ์ ์๋ ํจ์น๊ฐ ๋งค๋ ฅ์ฒ๋ผ ์๋ํฉ๋๋ค! ๊ฐ์ฌํฉ๋๋ค. 4๋ ์ด ์ง๋๋ ํจ์น๊ฐ ๋ง์คํฐ์ ๋ณํฉ๋์ง ์๋ ์ด์ ๊ฐ ๋ฌด์์ธ์ง ๊ถ๊ธํฉ๋๋ค.