タグ

zshに関するsgykfjsmのブックマーク (2)

  • zsh: 16 Options

    16.2.2 Completion ALWAYS_LAST_PROMPT <D> If unset, key functions that list completions try to return to the last prompt if given a numeric argument. If set these functions try to return to the last prompt if given no numeric argument. ALWAYS_TO_END If a completion is performed with the cursor within a word, and a full completion is inserted, the cursor is moved to the end of the word. That is, the

    sgykfjsm
    sgykfjsm 2020/04/06
  • zsh の zmv を使って簡単に複数ファイルを一括リネームする - mollifier delta blog

    連番のファイルがずらーっとあったとき、複数のファイル名を一気にスマートに変えたいことがある。一個ずつちまちまリネームなんてやってられない。そんなときは zsh の zmv を使うと便利なので紹介する。 zmv で何ができるか 例えばこんな感じで 1.txt から 6.txt までファイルがあったとする。 % ls 1.txt 3.txt 5.txt 2.txt 4.txt 6.txtでも、ファイル名短すぎてわかりにくいなー、file-1.txt みたいに頭に file ってつけたいなー、って思ったとしよう。 そんなときのために zsh には zmv ってコマンドがあって、この手の一括リネームがスマートにできる。お手軽な使い方はこんな感じ。 あらかじめ ~/.zshrc にこう書いておいてから、 autoload -Uz zmv alias zmv='noglob zmv -W' 一回のコマ

    zsh の zmv を使って簡単に複数ファイルを一括リネームする - mollifier delta blog
  • 1