Comments (7)
We need to make migration plan.
~/.rdbgrc
(and so on) are already there so we need to respect current files.
On the vim/vim#4275, it was closed because of duplication of vim/vim#2034 which has huge comments and not accepted (I can't read all of comments) but #4275
proposes:
~/.vimrc
~/.vim/vimrc
$XDG_CONFIG_DIR/vim/vimrc (if the env var is unset, its default is ~/.config)
For rdbgrc, making searching order as
~/.rdbgrc
$XDG_RUNTIME_DIR/rdbg/config if `XDG_RUNTIME_DIR` is available
is one idea.
For ~/.rdbg_histroy
there are two options:
- search
~/.rdbg_history
and$XDG_STATE_HOME/rdbg/history
if$XDG_STATE_HOME
is available - use
$XDG_STATE_HOME/rdbg/history
and ignore existing~/.rdbg_history
if$XDG_STATE_HOME
is available
2.1. with warning
Could you survey another software migration plan?
BTW my Ubuntu 24.04 machines only have the following XDG envvals:
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
XDG_RUNTIME_DIR=/run/user/1000
Who set config dir and state dir?
from debug.
BTW (2) I found NVIM_APPNAME
to change the app name (and we can switch configurations at once). Should we support it with RUBY_DEBUG_APPNAME
or something similar?
from debug.
Some thoughts on this issue based on @ko1's comments above:
For rdbgrc, making searching order as
~/.rdbgrc $XDG_RUNTIME_DIR/rdbg/config if `XDG_RUNTIME_DIR` is available
is one idea.
I'd expect to create a config file in $XDG_CONFIG_HOME
(e.g. ~/.config
) at a path like $XDG_CONFIG_HOME/rdbg/config
. I believe that more closely follows patterns details on the XDG page on the Arch wiki.
For
~/.rdbg_histroy
there are two options:
- search
~/.rdbg_history
and$XDG_STATE_HOME/rdbg/history
if$XDG_STATE_HOME
is available- use
$XDG_STATE_HOME/rdbg/history
and ignore existing~/.rdbg_history
if$XDG_STATE_HOME
is available
2.1. with warning
I think $XDG_DATA_HOME
(e.g. ~/.local/share
) is the more appropriate place for history files. Similar to my note above, the XDG page on the Arch wiki cites a number of examples using $XDG_DATA_HOME
for history files.
from debug.
Thank you.
Next we need to define the search order.
from debug.
I took a quick glance at the entries in sections 2.2 and 2.3 on the Arch wiki and, where noted, it looks like most apps prefer the "legacy" file (e.g. ~/.rdbg_history
) if present. Otherwise, search for the $XDG_*
-prefixed file path.
So, a restated version of @ko1's proposal above:
- prefer
~/.rdbgrc
if present, - else,
$XDG_CONFIG_HOME/rdbg/config
if$XDG_CONFIG_HOME
is set and$XDG_CONFIG_HOME/rdbg/config
is present, - else, no customized user configuration
For the history file:
- prefer
~/.rdbg_history
if present, - else,
$XDG_DATA_HOME/rdbg/history
if$XDG_DATA_HOME
is set¹
¹ There'd need to be a check for this file path. If it exists, great! If not, create the path $XDG_DATA_HOME/rdbg
and touch $XDG_DATA_HOME/rdbg/history
.
from debug.
Thank you. I'll make it (or PR is welecome)
from debug.
@ko1 I just opened a draft PR for this: #1055.
I think I got the desired logic correct, though I'm open to feedback and could use some help with adding any tests that the core team may wish to see.
from debug.
Related Issues (20)
- `rdbg` without no arguments HOT 3
- LocalJumpError: break from proc-closure on typo in debug prompt HOT 2
- Setting breaking points with absolute path fails from nvim-dap and rdbg on Docker container HOT 1
- binding.b doesn't stop code on second controller request and above
- History not available
- Setting the irb_console configuration true has no effect HOT 1
- <enter> does not repeat last command in irb_console mode.
- Proposal: reverse continue
- Feat/Bug: Set the value of `_` (underscore) to the value of the last ruby expression HOT 3
- Slow print (STDOUT) of large objects
- Question: Could not load source 'Fastfile': not found, while debugging a Fastlane lane from VSCODE
- Remove usage of deprecated constant IRB::InputCompletor
- `!!!` to fast forward breakpoints like in pry HOT 5
- Large data output HOT 1
- Add a shorter alias for the whereami command HOT 1
- Could not find valid gem HOT 1
- Cut a new release for the Rails stdin bug HOT 2
- Keystrokes between `debugger` sessions seem to persist HOT 4
- after_fork_parent method waits for all child processes to stop HOT 2
- Having to specify bundle exec twice HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from debug.