タグ

zshに関するakaneharaのブックマーク (5)

  • zshとbashでは変数の単語の分割ルールが違う - Qiita

    変数の値にスペースが含まれているとき、zshとbashで単語の分割ルールが違う。zshでシェルスクリプトを書くときに注意が必要になるので紹介する。 例1: 変数をコマンドの引数に指定する 変数の値にスペースを入れて、それをtouchコマンドの引数にしてみる。 zshの場合は変数の値が1つの単語として扱われる。なのでfile1 file2という1つのファイルが作成される。 % filename="file1 file2" % touch $filename % ls -l -rw-r--r-- 1 mollifier mollifier 0 12月 4 10:36 file1 file2

    zshとbashでは変数の単語の分割ルールが違う - Qiita
  • なぜ私は敢えて Zsh で Shell Script も書くのか、目的合理性はどこにあるのか - hkoba blog


     UNIX, Linux  bash  zsh   #!/bin/zsh          / sh   root   使sh
    なぜ私は敢えて Zsh で Shell Script も書くのか、目的合理性はどこにあるのか - hkoba blog
  • ZshでもBashでも動くfunctionを書くときのストレスを減らそう - Qiita


     zsh Advent Calendar 2015 3 Zsh  Zsh   Zsh   Zsh  Bash 調 Zsh  Bash function  Zsh setoptset -osetopt
    ZshでもBashでも動くfunctionを書くときのストレスを減らそう - Qiita
  • zsh / Code / [a66e92]

    Read Me ----------------- THE Z SHELL (ZSH) ----------------- Version ------- This is version 5.9 of the shell. This is a security and feature release. There are several visible improvements since 5.8.1, as well as bug fixes. All zsh installations are encouraged to upgrade as soon as possible. Note in particular the changes highlighted under "Incompatibilities since 5.8.1" below. See NEWS for more

  • zshのalias -s (suffix alias)が神な件 - プログラムモグモグ

    まず, 他のシェルをお使いの人にはごめんなさい. aliasコマンドの-sが使えるのは zsh 4.2.x- で, 他のシェルでは実装されていないと思います. あと, もう既に alias -s 知ってるよーって人は読まなくていいです. alias -s って何? 打ったコマンドの後ろ(suffix)を見て, 適当に宜しくやってくれるやつです. 次の例を見て下さい. ~$ echo "print ('hello, world')" > hello.py ~$ python hello.py hello, world ~$ alias -s py=python py=python ~$ ./hello.py hello, world ~$ Pythonのコードは python hello.py で実行出来ますが, お尻が py なら python を使います, とaliasしておけば, ./

    zshのalias -s (suffix alias)が神な件 - プログラムモグモグ
  • 1