버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.

...

코드 블럭
languagebash
themeEmacs
linenumberstrue
cp /oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc


Convert Bash History → Zsh History (if needed)

https://gist.github.com/muendelezaji/c14722ab66b505a49861b8a74e52b274

코드 블럭
languagebash
themeEmacs
linenumberstrue
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history

import sys
import time


def main():
    timestamp = None
    for line in sys.stdin.readlines():
        line = line.rstrip('\n')
        if line.startswith('#') and timestamp is None:
            t = line[1:]
            if t.isdigit():
                timestamp = t
                continue
        else:
            sys.stdout.write(': %s:0;%s\n' % (timestamp or time.time(), line))
            timestamp = None


if __name__ == '__main__':
    main()