通过命令行进行简单的笔记记录

2025-06-10

通过命令行进行简单的笔记记录

这是一个简单的函数,可以从命令行调用,就像常规命令一样。它是一种快速记录笔记并将其存储在文本文件中的方法。

只需将以下几行添加到您的~/.bashrc

# My function to take quick notes on useful commands
notes() {
    echo $1 >> $HOME/notes.md
}
Enter fullscreen mode Exit fullscreen mode

可以这样使用:

$ notes "my_command -which -I -want -to remember"
Enter fullscreen mode Exit fullscreen mode

你可以这样阅读你的笔记:

$ more ~/notes.md
Enter fullscreen mode Exit fullscreen mode
鏂囩珷鏉ユ簮锛�https://dev.to/ricardomol/note-take-from-the-command-line-156
PREV
使用 Hooks 和 Context API 替换 Redux:如何
NEXT
Git:重命名“master”分支