Tramp is Emacs’ way to access remote files, e.g. via SSH. To determine if the current buffer is accessing a tramp file (e.g. to not try to run gtags or similar), try this:
(not (tramp-tramp-file-p (buffer-file-name (current-buffer))))
A collection of coding snippets, tips, hints and random thoughts.
Tramp is Emacs’ way to access remote files, e.g. via SSH. To determine if the current buffer is accessing a tramp file (e.g. to not try to run gtags or similar), try this:
(not (tramp-tramp-file-p (buffer-file-name (current-buffer))))
I have a script which launches another program. That program takes some command line arguments, which in turn can have parameters. Those parameters may include “;”, which has a special meaning in the Bash. To quote these, you can use the following sed command:
$ echo "foo --bar=1 --baz=2" | sed -e 's/(--[^[:space:]]*=)([^[:space:]]*)/1"2"/g'
foo --bar="1" --baz="2"