Skip to main content
punctuation
Source Link
Matthias Braun
  • 8.8k
  • 8
  • 51
  • 63

User meuh's tip to use shell-expand-line led me to this solution which puts the environment variable's value on the command line:

$if mode=vi
  # Keymaps when we are in insert mode
  set keymap vi-insert

  # Expand variables like ~ and $USER to their values
  "\C-a": shell-expand-line
  # Insert path before mountpoint, then expand the variable
  "\C-e": "/run/media/$USER/\C-a"

Now, pressing Ctrl+e results in /run/media/me/ on the command line.

User meuh's tip to use shell-expand-line led me to this solution which puts the environment variable's value on the command line:

$if mode=vi
  # Keymaps when we are in insert mode
  set keymap vi-insert

  # Expand variables like ~ and $USER to their values
  "\C-a": shell-expand-line
  # Insert path before mountpoint then expand the variable
  "\C-e": "/run/media/$USER/\C-a"

Now, pressing Ctrl+e results in /run/media/me/ on the command line.

User meuh's tip to use shell-expand-line led me to this solution which puts the environment variable's value on the command line:

$if mode=vi
  # Keymaps when we are in insert mode
  set keymap vi-insert

  # Expand variables like ~ and $USER to their values
  "\C-a": shell-expand-line
  # Insert path before mountpoint, then expand the variable
  "\C-e": "/run/media/$USER/\C-a"

Now, pressing Ctrl+e results in /run/media/me/ on the command line.

Source Link
Matthias Braun
  • 8.8k
  • 8
  • 51
  • 63

User meuh's tip to use shell-expand-line led me to this solution which puts the environment variable's value on the command line:

$if mode=vi
  # Keymaps when we are in insert mode
  set keymap vi-insert

  # Expand variables like ~ and $USER to their values
  "\C-a": shell-expand-line
  # Insert path before mountpoint then expand the variable
  "\C-e": "/run/media/$USER/\C-a"

Now, pressing Ctrl+e results in /run/media/me/ on the command line.