{"id":119179,"date":"2024-02-24T09:26:32","date_gmt":"2024-02-24T00:26:32","guid":{"rendered":"https:\/\/softantenna.com\/blog\/?p=119179"},"modified":"2024-02-24T09:26:32","modified_gmt":"2024-02-24T00:26:32","slug":"atuin","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/atuin\/","title":{"rendered":"Atuin - bash\u3084zsh\u306e\u5c65\u6b74\u6a5f\u80fd\u3092SQLite\u3067\u7f6e\u304d\u63db\u3048\u3066\u5f37\u5316\u3059\u308b\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3"},"content":{"rendered":"<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/02\/s_20240223_135946.jpg\" alt=\"S 20240223 135946\" title=\"s_20240223_135946.jpg\" border=\"0\" width=\"860\" height=\"560\" \/><\/p>\n<p>bash\u3084zsh\u3001fish\u306e\u3088\u3046\u306a\u30e2\u30c0\u30f3\u306a\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u30b7\u30a7\u30eb\u306b\u306f\u3001\u904e\u53bb\u306b\u5165\u529b\u3057\u305f\u5185\u5bb9\u3092\u691c\u7d22\u30fb\u518d\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u300c\u5c65\u6b74\u6a5f\u80fd\u300d\u304c\u642d\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30b7\u30a7\u30eb\u306b\u7d44\u307f\u8fbc\u307e\u308c\u305f\u5c65\u6b74\u6a5f\u80fd\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u30b3\u30de\u30f3\u30c9\u5165\u529b\u306e\u52b9\u7387\u3092\u9ad8\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u3055\u3089\u306b\u4e0a\u3092\u76ee\u6307\u3059\u306a\u3089\u3070\u300c<a href=\"https:\/\/github.com\/atuinsh\/atuin\">Atuin<\/a>\u300d\u3092\u691c\u8a0e\u3057\u3066\u307f\u308b\u3068\u826f\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>Atuin\u306f\u3001\u65e2\u5b58\u306e\u30b7\u30a7\u30eb\u5c65\u6b74\u3092SQLite\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u7f6e\u304d\u63db\u3048\u3001\u5b9f\u884c\u3057\u305f\u30b3\u30de\u30f3\u30c9\u3084\u8ffd\u52a0\u60c5\u5831\u3092\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30c4\u30fc\u30eb\u3067\u3059\u3002\u30a8\u30f3\u30c9\u30c4\u30fc\u30a8\u30f3\u30c9\u306e\u6697\u53f7\u5316\u306b\u5bfe\u5fdc\u3057\u305f\u540c\u671f\u6a5f\u80fd\u3092\u5229\u7528\u3057\u3066\u3001\u8907\u6570\u306e\u30de\u30b7\u30f3\u3067\u540c\u3058\u5c65\u6b74\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u540c\u671f\u30b5\u30fc\u30d0\u30fc\u306f\u7121\u6599\u3067\u5229\u7528\u3067\u304d\u3001\u81ea\u5206\u3067\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3066\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Atuin\u306f\u4ee5\u4e0b\u306e\u30b7\u30a7\u30eb\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>zsh<\/li>\n<li>bash<\/li>\n<li>fish<\/li>\n<li>nushell<\/li>\n<li>xonsh<\/li>\n<\/ul>\n<p>\u4ee5\u4e0b\u4f7f\u7528\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2>Atuin\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/h2>\n<p>Atuin\u306fRust\u3067\u4f5c\u3089\u308c\u305f\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30c4\u30fc\u30eb\u3067\u3059\u3002Rust\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30ebcargo\u3092\u4f7f\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u3001macOS\u306e\u5834\u5408\u306f\u3001Homebrew\u3084MacPorts\u3092\u4f7f\u3063\u305f\u65b9\u304c\u7c21\u5358\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>Homebrew\u306e\u5834\u5408:<\/p>\n<pre>\r\nbrew install atuin\r\n<\/pre>\n<p>MacPorts\u306e\u5834\u5408:<\/p>\n<pre>\r\nsudo port install atuin\r\n<\/pre>\n<p>atuin\u30b3\u30de\u30f3\u30c9\u304c\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3089\u3001\u4ee5\u4e0b\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<code>atuin register<\/code>\u306f\u516c\u5f0f\u306e\u540c\u671f\u30b5\u30fc\u30d0\u30fc\u3092\u5229\u7528\u3057\u306a\u3044\u5834\u5408\u306f\u4e0d\u8981\u3067\u3059\u3002<\/p>\n<pre>\r\natuin register -u <USERNAME> -e <EMAIL>\r\natuin import auto\r\natuin sync\r\n<\/pre>\n<p>atuin\u306f\u5358\u4f53\u306e\u30b3\u30de\u30f3\u30c9\u3068\u3057\u3066\u3082\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u30b7\u30a7\u30eb\u306b\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u7528\u3059\u308b\u306e\u304c\u4fbf\u5229\u3067\u3059\u3002\u3053\u308c\u306b\u306f\u30b7\u30a7\u30eb\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>zsh\u306e\u5834\u5408:<\/p>\n<pre>\r\necho 'eval \"$(atuin init zsh)\"' >> ~\/.zshrc\r\n<\/pre>\n<p>bash\u306e\u5834\u5408:<\/p>\n<pre>\r\necho 'eval \"$(atuin init bash)\"' >> ~\/.bashrc\r\n<\/pre>\n<h2>Atuin\u306e\u4f7f\u7528\u65b9\u6cd5<\/h2>\n<p>\u30b7\u30a7\u30eb\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u304c\u5b8c\u4e86\u3059\u308b\u3068<code>\u2191(\u4e0a\u77e2\u5370)<\/code>\u3084\u3001<code>Ctrl + r<\/code>\u3067Atuin\u306e\u5c65\u6b74\u691c\u7d22\u6a5f\u80fd\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5c65\u6b74\u8868\u793a\u65b9\u6cd5\u306f\u3044\u304f\u3064\u304b\u9078\u3079\u307e\u3059\u304c<br \/>\n\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u306e\u5834\u5408\u3001\u67a0\u306e\u4e2d\u306b\u5c65\u6b74\u4e00\u89a7\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/02\/s_20240223_143222.jpg\" alt=\"S 20240223 143222\" title=\"s_20240223_143222.jpg\" border=\"0\" width=\"860\" height=\"560\" \/><\/p>\n<p>\u25b2\u6587\u5b57\u3092\u5165\u529b\u3057\u3066\u30b3\u30de\u30f3\u30c9\u3092\u30d5\u30a1\u30b8\u30fc\u691c\u7d22\u3057\u3066\u7d5e\u308a\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/02\/s_20240223_143651.jpg\" alt=\"S 20240223 143651\" title=\"s_20240223_143651.jpg\" border=\"0\" width=\"860\" height=\"560\" \/><\/p>\n<p>\u25b2\u8d64\u304f\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u73fe\u5728\u9078\u629e\u3055\u308c\u3066\u3044\u308b\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002Enter\u30ad\u30fc\u3092\u62bc\u3059\u3068\u305d\u306e\u30b3\u30de\u30f3\u30c9\u304c\u76f4\u63a5\u5b9f\u884c\u3055\u308c\u3001Tab\u30ad\u30fc\u3092\u62bc\u3059\u3068\u305d\u306e\u5185\u5bb9\u304c\u30bf\u30fc\u30df\u30ca\u30eb\u306b\u8cbc\u308a\u4ed8\u3051\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>\u5229\u7528\u3067\u304d\u308b\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30ad\u30fc\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>Shortcut<\/th>\n<th>Action<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>enter<\/td>\n<td>\u9078\u629e\u3057\u305f\u30a2\u30a4\u30c6\u30e0\u3092\u5b9f\u884c<\/td>\n<\/tr>\n<tr>\n<td>tab<\/td>\n<td>\u30a2\u30a4\u30c6\u30e0\u3092\u9078\u629e\u3057\u7de8\u96c6<\/td>\n<\/tr>\n<tr>\n<td>ctrl + r<\/td>\n<td>\u30d5\u30a3\u30eb\u30bf\u30fc\u30e2\u30fc\u30c9\u306e\u30b5\u30a4\u30af\u30eb<\/td>\n<\/tr>\n<tr>\n<td>ctrl + s<\/td>\n<td>\u691c\u7d22\u30e2\u30fc\u30c9\u306e\u30b5\u30a4\u30af\u30eb<\/td>\n<\/tr>\n<tr>\n<td>alt + 1 to alt + 9<\/td>\n<td>\u30a2\u30a4\u30c6\u30e0\u3092\u756a\u53f7\u3067\u9078\u629e<\/td>\n<\/tr>\n<tr>\n<td>ctrl + c \/ ctrl + d \/ ctrl + g \/ esc<\/td>\n<td>\u5143\u306b\u623b\u308b<\/td>\n<\/tr>\n<tr>\n<td>ctrl + y<\/td>\n<td>\u9078\u629e\u3057\u305f\u30a2\u30a4\u30c6\u30e0\u3092\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u623b\u308b<\/td>\n<\/tr>\n<tr>\n<td>ctrl + \u2b05\ufe0e \/ alt + b<\/td>\n<td>\u30ab\u30fc\u30bd\u30eb\u3092\u524d\u306e\u30ef\u30fc\u30c9\u306b\u79fb\u52d5<\/td>\n<\/tr>\n<tr>\n<td>ctrl + \u27a1\ufe0f \/ alt + f<\/td>\n<td>\u30ab\u30fc\u30bd\u30eb\u3092\u6b21\u306e\u30ef\u30fc\u30c9\u306b\u79fb\u52d5<\/td>\n<\/tr>\n<tr>\n<td>ctrl + b \/ \u2b05\ufe0e<\/td>\n<td>\u30ab\u30fc\u30bd\u30eb\u3092\u5de6\u306b\u79fb\u52d5<\/td>\n<\/tr>\n<tr>\n<td>ctrl + f \/ \u27a1\ufe0f<\/td>\n<td>\u30ab\u30fc\u30bd\u30eb\u3092\u53f3\u306b\u79fb\u52d5<\/td>\n<\/tr>\n<tr>\n<td>ctrl + a \/ home<\/td>\n<td>\u30ab\u30fc\u30bd\u30eb\u3092\u884c\u982d\u306b\u79fb\u52d5<\/td>\n<\/tr>\n<tr>\n<td>ctrl + e \/ end<\/td>\n<td>\u30ab\u30fc\u30bd\u30eb\u3092\u884c\u672b\u306b\u79fb\u52d5<\/td>\n<\/tr>\n<tr>\n<td>ctrl + backspace \/ ctrl + alt + backspace<\/td>\n<td>\u524d\u306e\u30ef\u30fc\u30c9\u3092\u524a\u9664 \/ \u30ab\u30fc\u30bd\u30eb\u306e\u76f4\u524d\u306e\u30ef\u30fc\u30c9\u3092\u524a\u9664<\/td>\n<\/tr>\n<tr>\n<td>ctrl + delete \/ ctrl + alt + delete<\/td>\n<td>\u6b21\u306e\u30ef\u30fc\u30c9\u3092\u524a\u9664 \/ \u30ab\u30fc\u30bd\u30eb\u306e\u76f4\u5f8c\u306e\u30ef\u30fc\u30c9\u3092\u524a\u9664<\/td>\n<\/tr>\n<tr>\n<td>ctrl + w<\/td>\n<td>\u30ab\u30fc\u30bd\u30eb\u306e\u524d\u306e\u30ef\u30fc\u30c9\u304c\u5358\u8a9e\u5883\u754c\u3092\u307e\u305f\u3044\u3067\u3044\u3066\u3082\u524a\u9664<\/td>\n<\/tr>\n<tr>\n<td>ctrl + u<\/td>\n<td>\u30ab\u30fc\u30bd\u30eb\u30e9\u30a4\u30f3\u6765\u3092\u30af\u30ea\u30a2\u30fc<\/td>\n<\/tr>\n<tr>\n<td>ctrl + n \/ ctrl + j \/ \u2b06<\/td>\n<td>\u6b21\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u9078\u629e<\/td>\n<\/tr>\n<tr>\n<td>ctrl + p \/ ctrl + k \/ \u2b07<\/td>\n<td>\u524d\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u9078\u629e<\/td>\n<\/tr>\n<tr>\n<td>page down<\/td>\n<td>\u691c\u7d22\u7d50\u679c\u30921\u30da\u30fc\u30b8\u4e0b\u306b\u30b9\u30af\u30ed\u30fc\u30eb<\/td>\n<\/tr>\n<tr>\n<td>page up<\/td>\n<td>\u691c\u7d22\u7d50\u679c\u30921\u30da\u30fc\u30b8\u4e0a\u306b\u30b9\u30af\u30ed\u30fc\u30eb<\/td>\n<\/tr>\n<tr>\n<td>\u2b07 (with no entry selected)<\/td>\n<td>\u30aa\u30ea\u30b8\u30ca\u30eb\u3092\u8fd4\u3059\u304b\u3001\u30af\u30a8\u30ea\u30fc\u3092\u8fd4\u3059\u304b\u3002<\/a>\n<\/td>\n<\/tr>\n<tr>\n<td>\u2b07<\/td>\n<td>\u30ea\u30b9\u30c8\u306e\u6b21\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u9078\u629e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n<p>\u30ad\u30fc\u30d0\u30a4\u30f3\u30c9\u306f\u4ed6\u306b\u3082Vim\u30e2\u30fc\u30c9\u304c\u5b58\u5728\u3057\u3001\u8a2d\u5b9a\u3067\u6709\u52b9\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306f<code>~\/.cofnig\/atuin\/config.toml<\/code>\u3067\u3001\u4f8b\u3048\u3070<code>style=\"compact\"<\/code>\u306b\u3059\u308b\u3068\u3001\u6b21\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/02\/s_20240223_145335.jpg\" alt=\"S 20240223 145335\" title=\"s_20240223_145335.jpg\" border=\"0\" width=\"860\" height=\"560\" \/><\/p>\n<p>\u25b2compact\u30e2\u30fc\u30c9\u3067\u306f\u67a0\u7dda\u304c\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002iTerm2\u306e\u5834\u5408\u300c<strong>Ambiguous characters are double-width<\/strong>\u300d\u306b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u3044\u308b\u3068\u67a0\u7dda\u304c\u305a\u308c\u3066\u6b63\u3057\u304f\u8868\u793a\u3055\u308c\u306a\u3044\u305f\u3081\u3001\u3053\u306e\u8868\u793a\u65b9\u6cd5\u3092\u9078\u629e\u3057\u305f\u65b9\u304c\u3088\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Atuin\u306f\u30b7\u30a7\u30eb\u306e\u5c65\u6b74\u6a5f\u80fd\u3092\u5f37\u5316\u3059\u308b\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u3067\u3059\u3002\u4ee5\u524d\u306e\u30d6\u30ed\u30b0\u8a18\u4e8b\u300c<a href=\"https:\/\/softantenna.com\/blog\/long-shell-history\/\">\u9577\u3044\u30b7\u30a7\u30eb\u5c65\u6b74\u4fdd\u6301\u306e\u30b9\u30b9\u30e1<\/a>\u300d\u3067\u3082Atuin\u306e\u540d\u524d\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002\u5b9f\u969b\u306b\u4f7f\u3063\u3066\u307f\u305f\u3044\u65b9\u306e\u53c2\u8003\u306b\u306a\u308c\u3070\u5e78\u3044\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>bash\u3084zsh\u3001fish\u306e\u3088\u3046\u306a\u30e2\u30c0\u30f3\u306a\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u30b7\u30a7\u30eb\u306b\u306f\u3001\u904e\u53bb\u306b\u5165\u529b\u3057\u305f\u5185\u5bb9\u3092\u691c\u7d22\u30fb\u518d\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u300c\u5c65\u6b74\u6a5f\u80fd\u300d\u304c\u642d\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u30b7\u30a7\u30eb\u306b\u7d44\u307f\u8fbc\u307e\u308c\u305f\u5c65\u6b74\u6a5f\u80fd\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u30b3\u30de\u30f3\u30c9\u5165\u529b\u306e\u52b9\u7387\u3092\u9ad8\u3081 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":119191,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[3459],"tags":[1360,4202,1421,339],"class_list":["post-119179","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-review","tag-bash","tag-fish","tag-sqlite","tag-zsh"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/119179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=119179"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/119179\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/119191"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=119179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=119179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=119179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}