mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-11-30 04:23:36 +08:00
Added documentation link for ssh helper plugin and further cleanup
This commit is contained in:
parent
ad63831b8f
commit
c761f9442c
|
@ -31,6 +31,7 @@
|
||||||
* __rbenv__ – [rbenv](https://github.com/sstephenson/rbenv) Ruby environment/version manager.
|
* __rbenv__ – [rbenv](https://github.com/sstephenson/rbenv) Ruby environment/version manager.
|
||||||
* __replace__ – A port of [replace](https://github.com/thoughtbot/dotfiles/blob/master/bin/replace).
|
* __replace__ – A port of [replace](https://github.com/thoughtbot/dotfiles/blob/master/bin/replace).
|
||||||
* __rvm__ – [RVM](http://rvm.io) Ruby version manager.
|
* __rvm__ – [RVM](http://rvm.io) Ruby version manager.
|
||||||
|
* __ssh__ – ssh conservative $TERM value helper.
|
||||||
* __sublime__ – Creates `subl` command line shortcut to launch [Sublime Text editor](http://sublimetext.com/).
|
* __sublime__ – Creates `subl` command line shortcut to launch [Sublime Text editor](http://sublimetext.com/).
|
||||||
* __tmux__ – Plugin to start tmux with support for 256 colours.
|
* __tmux__ – Plugin to start tmux with support for 256 colours.
|
||||||
* __vi-mode__ – Basic vi key bindings emulation for fish.
|
* __vi-mode__ – Basic vi key bindings emulation for fish.
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
## ssh conservative $TERM value helper plugin
|
## ssh conservative $TERM value helper
|
||||||
|
|
||||||
Due to inconsistency of 256 color terminal support across
|
Due to inconsistency of 256 color terminal support across
|
||||||
terminal applications, it may be desirable to force the
|
terminal applications, it may be desirable to force the
|
||||||
$TERM value to it's -256color variant.
|
$TERM value to it's -256color variant.
|
||||||
|
|
||||||
For example, this is often accomplished in tmux by means
|
For example, this is often accomplished in tmux by means
|
||||||
of adding the following to a tmux.conf file:
|
of adding the following to a tmux.conf file:
|
||||||
|
|
||||||
set -g default-terminal "screen-256color"
|
set -g default-terminal "screen-256color"
|
||||||
|
|
||||||
Unfortunately, remote hosts accessed via ssh may not have
|
Unfortunately, remote hosts accessed via ssh may not have
|
||||||
the requisite terminfo files, and may not even allow the
|
the requisite terminfo files, and may not even allow the
|
||||||
user to supply them, as is often the case with network
|
user to supply them, as is often the case with network
|
||||||
equipment and other appliances accessible via ssh.
|
equipment and other appliances accessible via ssh.
|
||||||
|
|
||||||
This helper strips the -256color suffix and exports a
|
This helper strips the -256color suffix and exports a
|
||||||
regular 'screen' or 'xterm' $TERM value when setting up
|
regular 'screen' or 'xterm' $TERM value when setting up
|
||||||
a ssh connection.
|
a ssh connection.
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
function ssh --description 'OpenSSH SSH client (remote login program) with a conservative $TERM value'
|
function ssh --description 'OpenSSH SSH client (remote login program) with a conservative $TERM value'
|
||||||
switch $TERM
|
switch $TERM
|
||||||
case screen-256color
|
case screen-256color
|
||||||
set -l -x TERM screen
|
set -lx TERM screen
|
||||||
command ssh $argv
|
command ssh $argv
|
||||||
case xterm-256color
|
case xterm-256color
|
||||||
set -l -x TERM xterm
|
set -lx TERM xterm
|
||||||
command ssh $argv
|
command ssh $argv
|
||||||
case '*'
|
case '*'
|
||||||
command ssh $argv
|
command ssh $argv
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user