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.
Related Issues (20)
- Deadlock on I/O HOT 10
- Debugger exceptions crash the debugger and disconnect from the client HOT 1
- Running irb on debugger on irb dose not save the irb history HOT 1
- Cannot attach docker container with `debugger` while `pry.binding` can HOT 4
- Any way to easily name the socket files? HOT 2
- REPL prints next prompt without printing result of previous command HOT 3
- The debugger command doesn't seem to work when using multiple threads at the same time. HOT 3
- Can't execute multiple line statement HOT 3
- Allow printing out + copying of full variables in VSCode HOT 1
- `rdbg` without no arguments HOT 2
- 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
- trace method can't accept number as first argument
- rdbg --util=gen-sockpath generate socket names that are too long HOT 5
- less paging support
- `source': uninitialized constant HOT 2
- Broken command history when I execute debugger on irb HOT 3
- DEBUGGER_.warn when skipping breakpoint because of RUBY_DEBUG_SKIP_PATH HOT 3
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.