Distributions
› Ubuntu
› Fedora
› CentOS
中文资源站
› 网易开源镜像站
bigxu
V2EX  ›  Linux

如何在 fish shell 脚本中把命令写入历史?

  •  
  •   bigxu · Jan 30, 2021 · 2904 views
    This topic created in 2111 days ago, the information mentioned may be changed or developed.

    在 zsh 中我可以这样

    #!/bin/zsh cmd="cd /special/dir" print -s $cmd" # save command in history for reuse

    这样的我的 history 中就会有一个 cd /special/dir 历史。

    在 fish shell 该怎么搞? ~

    1 replies  •  2021-02-01 02:09:53 +08:00
    vcfvct
    vcfvct
    Feb 1, 2021
    1
    也可以试试:
    https://github.com/jethrokuan/z
    可以少用很多 cd,
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3957 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 09:41 · PVG 17:41 · LAX 01:41 · JFK 04:41
    ♥ Do have faith in what you're doing.