xonsh 시작

배경.
파이톤제 파이톤용 유닉스 레이크 조개껍질이 있다고 들었는데, 조사해 보니 xonsh가 발견됐어요.
가져오기를 사용해 보고 싶어서 사용해 봤기 때문에 소감과 가져오기 방법을 기재합니다.
무엇
파이톤으로 만든 케이스
Python 코드의 기술 및 조개 명령을 CLI에서 사용할 수 있습니다.
즉 다음과 같은 일을 할 수 있다는 것이다.$ ls -l
total 0
-rw-r--r-- 1 Ryuichi staff 0 11 25 16:03 testfile.py
$ a = 20 ; b = 40
$ print(a + b)
60
명령/Pythhon 코드는 전환하지 않고 실행할 수 있습니다!대단해!
참조 사이트
◼ GitHub
◼ 공식 사이트
또한 @vaaaaanquish선생님은 일본어로 유용한 글을 많이 쓰셔서 참고 가치가 있으니 꼭 보십시오.(일본어 기사가 매우 적어 도움이 된다)
bash와zsh의 비교에 관하여 정부는 이렇게 총결하였다.
bash와zsh에 비해 IPython은 기능 면에서 모두 우수하다.
셸 명령을 사용하는 것은 매우 편리하다.
가져오기
아주 간단합니다.
공식 가이드에도 Mac 이외의 가져오기 방법이 있으니 참고하십시오.$ brew install xonsh
$ which xonsh
/usr/local/bin/xonsh
# 最新バージョンは0.8.3
$ $ xonsh --version
xonsh/0.8.3
# インストールしたら「xonsh」で起動します
$ xonsh
Welcome to the xonsh shell (0.8.3)
~ The xonsh is a symbol ~
------------------------------------------------------------------------------------------
xonfig tutorial -> Launch the tutorial in the browser
xonfig wizard -> Run the configuration wizard and claim your shell
(Note: Run the Wizard or create a ~/.xonshrc file to suppress the welcome screen)
Tab 보완에는 "bash-commpletion2"가 필요합니다.
1을 가져온 사용자는 삭제 후 설치합니다.$ brew unlink bash-completion
$ brew install bash-completion2
Tab 보완은 다음과 같이 성공적으로 설치되었습니다.
간단하게 해볼게요.
기본 동작
우선 각종 기본 조작을 시험해 보았다.
bash 스크립트 실행Ryuichi@iMac8270 ~/work/tmp/xonsh $ cat test.sh
#!/bin/bash
date
pwd
ls -l
echo 'hello xonsh' > test.tmp
cat test.tmp
rm -f test.tmp
ls -l test.tmp
Ryuichi@iMac8270 ~/work/tmp/xonsh $ ./test.sh
2018年 11月25日 日曜日 16時32分56秒 JST
/Users/Ryuichi/work/tmp/xonsh
total 8
-rwxr-xr-x 1 Ryuichi staff 101 11 25 16:32 test.sh
-rw-r--r-- 1 Ryuichi staff 0 11 25 16:03 testfile.py
hello xonsh
ls: test.tmp: No such file or directory
위의 글은 실행할 수 있고 물론 재미도 없으니 다음에 파이톤의 문법을 혼합해서 하자.
ptyhon 및 uname 명령을 사용하여 OS 이름과 호스트 이름을 표시합니다.$ cat testfile
import platform
import socket
uname -s
hostname
print(platform.system())
print(socket.gethostname())
$ ./testfile
Darwin
iMac8270
Darwin
iMac8270
총결산
어쨌든 영입될 때까지
명령 제작과 탭 보완 제작도 시도했지만 언젠가는 글로 정리될 것이다.
Reference
이 문제에 관하여(xonsh 시작), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ryuichi1208/items/1c127cf3dc827e76409f
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
파이톤으로 만든 케이스
Python 코드의 기술 및 조개 명령을 CLI에서 사용할 수 있습니다.
즉 다음과 같은 일을 할 수 있다는 것이다.
$ ls -l
total 0
-rw-r--r-- 1 Ryuichi staff 0 11 25 16:03 testfile.py
$ a = 20 ; b = 40
$ print(a + b)
60
명령/Pythhon 코드는 전환하지 않고 실행할 수 있습니다!대단해!참조 사이트
◼ GitHub
◼ 공식 사이트
또한 @vaaaaanquish선생님은 일본어로 유용한 글을 많이 쓰셔서 참고 가치가 있으니 꼭 보십시오.(일본어 기사가 매우 적어 도움이 된다)
bash와zsh의 비교에 관하여 정부는 이렇게 총결하였다.

bash와zsh에 비해 IPython은 기능 면에서 모두 우수하다.
셸 명령을 사용하는 것은 매우 편리하다.
가져오기
아주 간단합니다.
공식 가이드에도 Mac 이외의 가져오기 방법이 있으니 참고하십시오.$ brew install xonsh
$ which xonsh
/usr/local/bin/xonsh
# 最新バージョンは0.8.3
$ $ xonsh --version
xonsh/0.8.3
# インストールしたら「xonsh」で起動します
$ xonsh
Welcome to the xonsh shell (0.8.3)
~ The xonsh is a symbol ~
------------------------------------------------------------------------------------------
xonfig tutorial -> Launch the tutorial in the browser
xonfig wizard -> Run the configuration wizard and claim your shell
(Note: Run the Wizard or create a ~/.xonshrc file to suppress the welcome screen)
Tab 보완에는 "bash-commpletion2"가 필요합니다.
1을 가져온 사용자는 삭제 후 설치합니다.$ brew unlink bash-completion
$ brew install bash-completion2
Tab 보완은 다음과 같이 성공적으로 설치되었습니다.
간단하게 해볼게요.
기본 동작
우선 각종 기본 조작을 시험해 보았다.
bash 스크립트 실행Ryuichi@iMac8270 ~/work/tmp/xonsh $ cat test.sh
#!/bin/bash
date
pwd
ls -l
echo 'hello xonsh' > test.tmp
cat test.tmp
rm -f test.tmp
ls -l test.tmp
Ryuichi@iMac8270 ~/work/tmp/xonsh $ ./test.sh
2018年 11月25日 日曜日 16時32分56秒 JST
/Users/Ryuichi/work/tmp/xonsh
total 8
-rwxr-xr-x 1 Ryuichi staff 101 11 25 16:32 test.sh
-rw-r--r-- 1 Ryuichi staff 0 11 25 16:03 testfile.py
hello xonsh
ls: test.tmp: No such file or directory
위의 글은 실행할 수 있고 물론 재미도 없으니 다음에 파이톤의 문법을 혼합해서 하자.
ptyhon 및 uname 명령을 사용하여 OS 이름과 호스트 이름을 표시합니다.$ cat testfile
import platform
import socket
uname -s
hostname
print(platform.system())
print(socket.gethostname())
$ ./testfile
Darwin
iMac8270
Darwin
iMac8270
총결산
어쨌든 영입될 때까지
명령 제작과 탭 보완 제작도 시도했지만 언젠가는 글로 정리될 것이다.
Reference
이 문제에 관하여(xonsh 시작), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ryuichi1208/items/1c127cf3dc827e76409f
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
$ brew install xonsh
$ which xonsh
/usr/local/bin/xonsh
# 最新バージョンは0.8.3
$ $ xonsh --version
xonsh/0.8.3
# インストールしたら「xonsh」で起動します
$ xonsh
Welcome to the xonsh shell (0.8.3)
~ The xonsh is a symbol ~
------------------------------------------------------------------------------------------
xonfig tutorial -> Launch the tutorial in the browser
xonfig wizard -> Run the configuration wizard and claim your shell
(Note: Run the Wizard or create a ~/.xonshrc file to suppress the welcome screen)
$ brew unlink bash-completion
$ brew install bash-completion2
기본 동작
우선 각종 기본 조작을 시험해 보았다.
bash 스크립트 실행
Ryuichi@iMac8270 ~/work/tmp/xonsh $ cat test.sh
#!/bin/bash
date
pwd
ls -l
echo 'hello xonsh' > test.tmp
cat test.tmp
rm -f test.tmp
ls -l test.tmp
Ryuichi@iMac8270 ~/work/tmp/xonsh $ ./test.sh
2018年 11月25日 日曜日 16時32分56秒 JST
/Users/Ryuichi/work/tmp/xonsh
total 8
-rwxr-xr-x 1 Ryuichi staff 101 11 25 16:32 test.sh
-rw-r--r-- 1 Ryuichi staff 0 11 25 16:03 testfile.py
hello xonsh
ls: test.tmp: No such file or directory
위의 글은 실행할 수 있고 물론 재미도 없으니 다음에 파이톤의 문법을 혼합해서 하자.ptyhon 및 uname 명령을 사용하여 OS 이름과 호스트 이름을 표시합니다.
$ cat testfile
import platform
import socket
uname -s
hostname
print(platform.system())
print(socket.gethostname())
$ ./testfile
Darwin
iMac8270
Darwin
iMac8270
총결산
어쨌든 영입될 때까지
명령 제작과 탭 보완 제작도 시도했지만 언젠가는 글로 정리될 것이다.
Reference
이 문제에 관하여(xonsh 시작), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ryuichi1208/items/1c127cf3dc827e76409f
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
Reference
이 문제에 관하여(xonsh 시작), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/ryuichi1208/items/1c127cf3dc827e76409f텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)