问题标签 [dotfiles]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
bash - 从 Bash 中决定 Vimfiles 目录
我想获取vimfiles
用户的目录。鉴于用户可以假定使用除 之外的目录,从的变量~/.vim/
中检索目录将是最佳的跨平台方式。但是怎么做?vim
vimfiles
我认为调用类似的东西vim -q -c COMMAND
实际上可能是解决方案,但不确定COMMAND
要使用的东西。
bash - 如何通过 shell 脚本获取文件
我编写了一个 shell 脚本,在其中将我的 .bashrc 文件以及自定义点文件复制到备份文件夹中,然后在我的主文件夹中将它们替换为另一个 .bashrc 文件,该文件将获取我的自定义点文件。
但是,在脚本完成其工作后,如果我尝试执行包含在新文件中的别名,则会收到错误消息No command found
。只有在终端中手动获取 .bashrc 文件后,我才能访问它们。
据我了解,我正在运行的脚本正在一个子shell(?)中执行,该子shell将在执行时终止。
如何运行脚本并获得新的命令/别名/函数,而无需自己获取 .bashrc 文件或重新启动终端?
emacs - Emacs24 - 不区分大小写的自动完成 Mx 加载文件
必须在 Emacs24 中设置什么设置才能使load-file
命令不区分大小写?
shell - 如何在鱼壳中导出函数
我正在将我的一些脚本从 shell 移植bash
到fish
shell,但无法访问我的实用程序功能。
重击
这是我在 bash 中的操作方式,首先在中声明我的方法"$HOME/.my-posixrc"
:
然后获取此文件:
所以我可以这样做:
2015 年 12 月 13 日
鱼
然后在以下位置获取此文件~/.config/fish/config.fish
:
但是找不到方法:
当前未安装“今天”程序。您可以通过键入安装它: sudo apt-get install mhc-utils
问题
如何“导出”我的函数,以便在提示符中访问它们?
PS:我的dotfiles 可以在 github 上找到。
ruby - Is it a Bad Practice to Have Both a .rvmrc and a .ruby-version in a Ruby Project?
There are two Ruby projects I am currently working on which have both a .rvmrc
and a .ruby-version
file in their root dir. I use rvm to manage my Ruby versions in my local development environment, and have my own local .rvmrc
files in my home directory's copy of various Ruby versions, so naturally I get the rvm warning when I change directory into these projects:
You are using '.rvmrc', it requires trusting, it is slower and it is not compatible with other ruby managers, you can switch to '.ruby-version' using 'rvm rvmrc to ruby-version' or ignore this warning with 'rvm rvmrc warning ignore /home/ME/craft/ruby/rails/CLIENT/APPLICATION/.rvmrc', '.rvmrc' will continue to be the default project file in RVM 1 and RVM 2, to ignore the warning for all files run 'rvm rvmrc warning ignore all.rvmrcs'.
I felt it was odd to have both configuration dotfiles in the same project at first, and figured that it might be a historical quirk to the Ruby culture that I was unaware of (Im a less-opinionated language generalist, really). Personally I never use .rvmrc
in a project, and I work on 10-15 Ruby projects in a year, and rarely see this file in anything I work with.
The problem really arises on the 2nd of these two projects, where the .rvmrc
file has an older patch of the Ruby version than the .ruby-version
. This resulted in some complications for my local environment that I resolved, though I feel its a bit awkward. To make it worse, I fixed my environment for the (git) 'master' branch of the project, and when I switched to the latest feature branch, the .ruby-version
file was updated to yet another different patch number. So I repeated things like reinstalling bundler, reinstalling all the gems, and I choose to manually switch to this patch version. I am unsure of the 'correct' way to do the above, and this way seems to work for my environment (at the cost of duplicating gems and taking up a bit of space on my hard disk).
I am concerned as to why a project would have both these files defined, and especially concerned for a project that has differing versions/patch numbers in each file.
Is this normal? Should this be rectified by removing the .rvmrc
file from the project? Should the .rvmrc
file, at the very least, be updated to the same version and patch number as the .ruby-version
file? I instinctively feel this isnt right, but want to be aware of any sort of history regarding rvm and other methods for maintaining Ruby versions which might actually make this decision sensible. Can anyone relay the history of how such a situation might sensibly evolve, or is it just a symptom of too many cooks in the kitchen over time?
(possibly related question concerning .ruby-version
and Gemfile)
git - 如何在带有别名的 gitconfig 中正确使用 bash 变量
这是我稍后创建分支并在该分支上设置上游的别名:
但是无论我执行以下命令,它都会一直显示语法错误,如下所示:new-branch-name: develop: command not found
我需要做什么才能使上述别名起作用?非常感谢!
node.js - 在客户端机器上存储 node_package 特定设置的位置?
我有一个 node_package bookiza(全局安装),它使用从 .rc 文件中取出的凭据将值发布到接收基板。
我目前将.rc
文件保存在模块本身中, at usr/lib/node_modules/bookiza
,但我可以在任何我喜欢的地方这样做。将其存储在包中的问题是,每当用户npm i -g installs
再次更新包时,设置都会被覆盖。
这可行,但请注意该.dotfile
文件保存在usr/lib/node_modules/
目录中,作为安装在机器上的其他全局包的兄弟。现在我也可以将设置文件放在机器上的其他任何地方,但是这样做的好习惯/标准方法是什么?
将设置文件放在一个usr/lib/node_modules/dots
文件夹中对我来说会更好吗?将来其他包编写者也可能会放置他们的 .rc 文件?
git - Setting up DotBot & Antigen
I am setting up some dotfile configurations. I am using DotBot for automating symlinks
Here is my a list of my files on my .dotfile
folder
This is the zshrc file to setup antigen
This is my install.conf.yaml for the DotBot configuration
I get a error when I run ./install in my .dotfile folder, to initiate DotBot.
My Goal is to setup zsh with anitgen & dotbot as submodues in a git repository that I can track. dotbot should create symlkinks so I can modify my Dot Files and keep them in sync with github and install them on a new machine easily.
Thanks in advance!